The key in politics is to snatch victory from the jaws of victory.

The senseless government shutdown has led to a rout of the tea party, right-wing extremism and a Republican leadership that was cowed into a march toward oblivion. But a great deal hangs on what happens next. Will this be a watershed moment? Or do we return to the same dreary politics we were having before this sorry episode?

What needs to happen is a sharp course correction — from an agenda championed by the forces that were beaten in the last election to an engagement with the problems our nation must solve.

It would be an utter waste to revisit the obsessions of 2011 and the presumption that budget cutting and deficit reduction should be the sole priorities of the political class. Recall that Rep. Paul Ryan was the other member of the Republican ticket that lost last year. Ryan’s proposal to slash spending played an central role in Mitt Romney’s defeat.

The United States should build, not just cut. We should invest again in an infrastructure whose decayed condition ought to shame us. We should deal with high ongoing unemployment, reverse the rise of inequality, and give poor and working-class kids real opportunities for upward mobility.

Future negotiations must be premised on getting rid of sequester cuts that are hobbling our economy. And talk of changes in Social Security and Medicare need to take into account not only their long-term costs — which require, above all, further fixes to our health care system — but also how these programs may be inadequate for a generation whose members will not enjoy the pensions their grandfathers had. “Reform of entitlements” has to mean more than scaling them back.

Before history is rewritten, it's important to understand that the American people really did blame this mess on the GOP and really did revolt against the tea party's irrationality. The public's reaction was not "a plague on both your houses," even if the shenanigans made Congress as a whole look very bad.

The turning point for House Speaker John Boehner may well have been an NBC News/Wall Street Journal Poll released Thursday showing that the Republican Party’s positive rating was at its lowest ever, at 24 percent, while President Barack Obama’s positive rating was up slightly since September, to 47 percent. By 47 percent to 39 percent, the public said it preferred a Democratic Congress to a Republican Congress. In July, the two parties were tied.

Beneath these numbers were two other instructive shifts. Positive feelings toward the tea party fell to 21 percent, down from 34 percent at the movement's peak in June 2010. The tea party, in other words, has lost well over one-third of its friends. Commentators, it's time to stop pretending that the tea party speaks for the American "grass roots." This crowd is simply the old far-right minority that has always existed, with a larger media megaphone.

This swing was connected to another. The NBC/Journal pollsters asked respondents to choose between two statements: Whether “government should do more to solve problems and meet the needs of people,” or whether “government is doing too many things better left to business and individuals.” In October 2010, only 45 percent chose the first, pro-government statement. In the latest poll, 52 percent did.

Poll numbers can fluctuate over time, of course, but these dramatic findings illuminate the overall message of this affair: After both seeing and experiencing the costs of anti-government radicalism, the American majority has said it wants a government that cares more about making things better than making itself smaller. Republican pollster Bill McInturff nicely captured the results of his party’s disastrous display, calling its strategy “an ideological boomerang.”

It is up to Obama to seize this moment. If he just slips into the style of budget negotiations that so weakened him in the summer of 2011, he will have squandered a triumph won by his willingness to stand firm. If he allows his opponents to regroup and act as if this huge reversal never happened, he will lose the chance to push his priorities to the fore: universal pre-kindergarten education, immigration reform, rebuilding our transportation and communications systems — and, one would like to hope, an even broader agenda for speeding growth and sharing its dividends fairly.

Obama’s 2012 re-election failed to break the right-wing fever he always talked about. Now is the time to heal the nation of this infirmity.