“I do not come here to pin a rose on this legislation,” Nancy Pelosi said, just before 10 P.M. Washington time, as a bill to end the debt-ceiling crisis came to the floor of the House. “It does not have that respect.” She delivered the votes for it, though. Two hundred and eighty-five representatives said yes, eighty-seven of them Republicans—and, with that, after sixteen days of shutdown, Congress will let federal workers do their jobs and the Treasury pay our bills and not disgrace the country. There has been enough of that from G.O.P. extremists, who, after spending Wednesday staggering around Washington, wondering where it had all gone wrong, won nothing in the final bill.

Obama held out, and got a stubborn victory. The Republican Party was exposed as a mottled wreck. That’s good to know, but not good to have: a broken party can do a lot of damage. The crisis did not end in a way that will contain its dysfunction. On Tuesday, it looked like John Boehner, the Speaker of the House, couldn’t control his caucus at all, alarming anyone who assumed that the G.O.P.’s leaders would know when and how to manage an orderly surrender. Fitch, the rating agency, had to put the U.S. under a negative credit watch, and we got within hours of hitting the debt ceiling before the G.O.P. dragged itself together. The Democrats won without betraying millions of uninsured Americans; the bill doesn’t substantively change Obamacare, let alone defund it—the Republican goal—and they didn’t give up anything else. They pushed, and that was useful. But it is not as though some country-bettering initiative made it through, after a lot of wasted time. The bill only keeps the government open until January 15th, with budget talks in December, and the debt ceiling at a sufficient height until February 7th. The whole package gets at most two cheers.

This is not an end to the drama of Republican dissension. Before the senators voted, just after eight, they had to listen to a lecture from Ted Cruz, of Texas, who has an odd ability to make smooth tones feel screechy. “I ask you to imagine a world in which Senate Republicans united to support House Republicans,” Cruz said. Americans did imagine that world; they got a glimpse of it in the shutdown, which Standard & Poor’s estimated cost the economy twenty-four billion dollars. That’s why the Republicans lost. But Cruz carried on, chiding his colleagues for not being as brave as he was. In the Senate itself, he might have done nothing more than run up the vote for the other side—the bill passed 81-18, and he really is that unpopular. Earlier, John McCain had called Cruz’s defunding-Obamacare project a “shameful” chapter and an “agonizing odyssey,” and the Houston Chronicle said it had regrets about endorsing Cruz. And yet, Cruz has followers who listen and nod when he talks about Obamacare as the key to everything wrong with America. On the Senate floor, he was already mythologizing the moment, turning the end of an expensive farce into a tragic stab in the back. We can look forward to hearing a polished version of that story in the 2016 Presidential debates.

When the Republicans woke up on Wednesday and realized that this fight was over, a lot of press reports used the word “chastened” to describe their mood. It may have just been a numbness that settled on the party—the anesthetic of a humiliating loss. That will wear off in a few hours or days, and, then, does anyone think that the House Republicans will be wiser? Some already seem to be persuading themselves that they have learned some tricks, and can win this same carnival game in February. If the G.O.P. were a sunny, well-run juggernaut, it might push through policies that do a lot of damage to the country. But a divided, sour, reckless party that, as George Packer and Jelani Cobb point out, trades on racial bitterness ever more explicitly can poison our political culture to an extent that should give no one pleasure.

Boehner, meanwhile, seems to have kept his job. It’s not exactly a case of virtue rewarded. He told his people to get a good night’s sleep, perhaps the only sensible prescription to emerge from the Republican camp. There was no drama about the final tally; a bill like this one would have passed from the start had Boehner allowed it to go to the floor for a vote. That was just one of a few hundred points of nonsense. Republican extremists set out to use the threat of newborns without nutritional assistance and bondholders without interest payments—small disasters and global financial crisis—to force the Democrats to tear up the Affordable Care Act, and the leadership let it roll. Maybe they thought that this is how Congress works; maybe they didn’t think. “We fought the good fight. We just didn’t win,” Boehner said. It was neither the good fight nor a good piece of fighting. It was a mess.

“Hopefully, next time it won’t be in the eleventh hour,” President Obama said. It was well before the eleventh when the President spoke; he came out at around 8:30 P.M., after the Senate had passed the bill. It was telling that he didn’t wait for the House to actually vote. Why subject oneself to the theatrics, or pretend that they had much to say? He was polite, thanking (though not naming) the leaders of both parties, and said that he’d sign their bill “immediately” when it gets to his desk, where memos about the database problems with the Obamacare Web site may also be waiting. He didn’t use phrases like “hostage-takers.” But he wasn’t pinning any roses, either. He had the air of someone who’d had too many evenings ruined because he had to drive home a drunk colleague he didn’t even like. He was done with this crisis, this Congress, this day. He said he would talk to everybody in the morning.

Photograph by Bill Clark/CQ Roll Call/Getty