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 House 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 that led to the shutdown in the first place?

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.

Democrats have been much tougher in this round of negotiations than they were in the past not only because the GOP vastly overreached in trying to gut Obamacare, but also because they know how important it is to insist that budget cutting and deficit reduction not be the sole priority of the political class. Rep. Paul Ryan (who was, by the way, the other member of the Republican ticket that lost last year, partly because of his budget ideas) hoped to steer the talks in this direction. But Democrats have made it clear that it’s not 2011 anymore.

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 on matching future cuts with new revenues. 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 grandparents had.

Before history is rewritten, it’s important to understand that the American people really have blamed this mess on the GOP and really did revolt against the tea party’s irrationality. The public’s reaction has not been “a plague on both your houses,” even if the shenanigans make Congress as a whole look very bad.

The turning point may well have been an NBC News/Wall Street Journal poll released Thursday showing that the Republican Party’s positive rating was its lowest ever, 24 percent, while President Obama’s positive rating was up slightly 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: “Government should do more to solve problems and help meet the needs of people,” or “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 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 described his party’s disastrous display, calling its strategy “an ideological boomerang.”

The president and his allies seem determined to seize this moment and not squander a triumph built on a willingness to stand firm against right-wing radicalism. Obama can’t slip back into the style of deficit wrangling that so weakened him in 2011. He now has an opening to refocus on his priorities: 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.

So, what was the reason for shutting down the government? (Ann Telnaes/The Washington Post)

Obama’s 2012 reelection failed to break the right-wing fever he has always said would abate some day. Now is the time to heal the nation of this infirmity.

Read more from E.J. Dionne’s archive, follow him on Twitter or subscribe to his updates on Facebook.