The Republicans have claimed the US Senate, extended their majority in the US House and secured more than their share of victories in state and local races. Now every effort will be made by the many critics of Barack Obama to employ the results of the 2014 midterm elections in the work of writing the president off as a lame duck.

But sixth-year setbacks are common for presidents. And Obama need not let this one define him. Indeed, he has a duty to defend the mandates he received in 2008 and 2012.

This is the point of beginning for the final stage of Obama’s presidency. He can shape the narrative. But if he fails to do so, others will. And in so doing they will diminish not just the president but the will of the people who elected him twice.

This will have less to do with policy—since a gridlocked Washington is likely to remain gridlocked on many issues—than with personalities and palace intrigues that so appeal to political and media elites. Yet, the defining process is significant, as it can influence decisions about whether to negotiate or veto, to hold firm for principles or to search for “grand bargains,” to rally the base or bend to the opposition.

Even before the results started coming in on Tuesday night, much of the pre-election prognostication had Obama headed for full lame-duck status. Never mind that the Republicans had most of the advantages going into the 2014 election cycle: fewer Senate seats to defend, a pattern of Democratic retirements in Republican-leaning states such as Montana, South Dakota and West Virginia; plenty of billionaire friends and corporate allies; and a second-term president with reduced approval ratings. There was never any doubt that a shift in control of the chamber was going to herald a full flurry of “definitive” statements and how Obama has been checked and balanced for the final quarter of his eight years in office.

But does a poor election result necessarily mark the end of a president’s relevance? Should a president whose party fails to perform be consigned to the dustbin of history?

Is this what history proposes?

Actually, no.

Consider Ronald Reagan. His Republican allies lost control of the Senate in the midterm election of 1986, the sixth year of his presidency. They went into that year’s contest with fifty-three seats and came out with forty-five. The House was already run by the Democrats, and the eight-seat shift in the Senate was dramatic. Yet most Republicans would tell you that Reagan remained a significant figure in American politics; and, it should be noted, in 1989 he handed the presidency off to another Republican president.

Consider Dwight Eisenhower. Going into the midterm elections of 1958, the sixth year of his presidency, the Senate was almost evenly divided (forty-nine Democrats versus forty-seven Republicans in a chamber where a number of Southern Democrats frequently aligned with the Republicans). In that election, Democrats picked up a remarkable fifteen seats. Many of the new senators were swept in on a wave of frustration with Eisenhower’s farm policies, as were many of the new members of the House—where a solid Democratic majority of 234-201 was transformed by the 1958 election into an overwhelming 283-153 advantage. Yet, Eisenhower, whose approval rating had dropped into the forties in 1958, rebounded to finish his presidency with influence on Capitol Hill and approval ratings that frequently topped 60 percent. In the fall of late 1958, he secured confirmation of a new Supreme Court justice (Potter Stewart); in 1959 he formally welcomed two new states into the union (Alaska and Hawaii); in 1961, he delivered a mighty fine speech about the military-industrial complex, opening a debate that continues to this day.

Consider Franklin Delano Roosevelt. In the midterm elections of 1938, the sixth year of his presidency, FDR’s Democrats suffered setbacks nationwide. Republicans gained seven US Senate seats, eighty-one US House seats and a dozen governorships in battleground states such as Pennsylvania, Ohio and Michigan. Roosevelt’s Progressive and Farmer-Labor allies lost governorships and congressional seats in Wisconsin and Minnesota. “The New Deal has been halted,” declared veteran New York Times columnist Arthur Krock. Two years later, however, Roosevelt became the only president ever to re-elected to a third term—winning 55 percent of the popular vote and a 449-82 advantage in the Electoral College.

Of course, the political dynamics of today are different from those of 1986 or 1958 or 1938. The political process is always evolving. But the thing to remember is that presidents can and do play a role in that evolution. They are far better positioned than other political figures to shape it. This is the lesson of history. It is also the prospect that remains on the table now that the 2014 midterm elections have—with due respect to the Louisiana Senate runoff and a few potential recounts—produced a result.

That result is important. But it need not be definitional.

Reagan, Eisenhower and Roosevelt were all written off, decried and dismissed by their critics. Yet they decided that they—not their foes—would write the last chapters of their presidencies.

Presidents have lost the Senate. Presidents have lost the Congress as a whole. And yet, they have governed—sometimes by going to the people and rallying the great mass of Americans to their side, sometimes by outmaneuvering the opposition of Capitol Hill, sometimes by bargaining and bending and compromising.

Obama has plenty of openings to define the last two years of his tenure. The Republicans have not won veto-proof majorities in the House and Senate; the president can still say “no” to them. And on a lot of major issues, that will be the right move. Indeed, for Americans who fret about the prospect of a Republican-controlled Congress, the best response will be to push and prod the president to stand strong against the economic and social compromises that might be demanded conservative Republicans and by corporate Democrats—and that will surely be cheered on by the newspaper editorial pages that seem to think any deal is better than the dreaded gridlock.

The president should refuse to approve the Keystone XL pipeline. He should use his executive authority to suspend deportations, and to force a real discussion about comprehensive immigration reform, He should reject, absolutely, every proposal to undermine Social Security, Medicare and Medicaid.

If the president’s resolve begins to weaken on any of these issues, activists should not hesitate to demand that he recognize what is at stake—not just politically but practically for the great mass of Americans who do not have the resources to buy elections or pay for lobbyists. These are the people who elected Barack Obama president in 2008 and 2012. They gave him a mandate and he has a responsibility, to his supporters and to himself, to defend it with his veto pen, his executive orders and his bully pulpit.

None of this bars the prospect of reasonable compromise and cooperation. But Obama and his allies should be determined to assure that it is the president, not his opposition, that defines the terms.

Things have changed in Washington as a result of the 2014 election, and they will change a good deal more in the weeks and months to come. That is certain. But how things change, for Obama and the Democrats, for Mitch McConnell and the Republicans, remains up for grabs. That may be unsettling, even disappointing, for those who believe that every election is the most important in history. But history tells us that presidents can and do survive midterm setbacks. Indeed, it is the ability to survive and even to thrive in the aftermath of a midterm setback, that has characterized this country’s most remembered and frequently revered presidents.