WASHINGTON -- Senate leaders unveiled a deal Wednesday to reopen the government and avoid a potential debt default that does virtually nothing to Obamacare, leaving intact the the law that tea party Republicans targeted in the shutdown fight.
House Speaker John Boehner (R-Ohio), who failed in crafting his own plan, conceded several hours later that he would accept the measure, setting up a vote for later in the day.
“The House has fought with everything it has to convince the president of the United States to engage in bipartisan negotiations aimed at addressing our country's debt and providing fairness for the American people under ObamaCare. That fight will continue," Boehner said in a statement. "But blocking the bipartisan agreement reached today by the members of the Senate will not be a tactic for us."
Senate Majority Leader Harry Reid (D-Nev.) and Minority Leader Mitch McConnell (R-Ky.) announced the deal jointly on the Senate floor, saying they had stepped in after Boehner was unable to find a solution in his chamber.
The deal developed by the two Senate leaders would open the government until Jan. 15 and extend the debt ceiling through Feb. 7. It also includes backpay for furloughed federal workers and an agreement for the House and Senate to finally -- for the first time in years -- open a conference committee to hash out their differing budgets, perhaps allowing them to find a longer-term solution.
"The eyes of the world were on Washington this week," Reid said. "And while they witnessed a great deal of political discord, today they will also see Congress reach a historic, bipartisan agreement."
Reid and McConnell had to come to the rescue after tea party groups torpedoed Boehner's version of a compromise Tuesday.
“After yesterday’s events, the majority leader and I began a series of conversations about a way to get the government re-opened and prevent default," said McConnell. “I’m confident we’ll be able to begin to do both those things later today."
He emphasized the fact that Democrats had to agree to keep to budget numbers set in 2011, when Congress agreed to sequestration and the Budget Control Act after another debt-related standoff.
“That’s been a top priority for me and my Republican colleagues throughout this debate. And it’s been worth the effort," McConnell said.
But the showdown actually began after Sens. Ted Cruz (R-Texas) and Mike Lee (R-Utah) spent the summer pushing to have the House tie government funding to measure that would defund the Affordable Care Act, President Barack Obama's signature health care law.
Boehner resisted that effort at first, but ultimately gave in, starting the battle that has closed large swaths of the federal government for 16 days and left the country right on the edge of a potential default on Thursday.
Senate Democratic aides said Boehner had agreed to pass the measure, although he had not publicly announced his plans. His conference was set to meet at 3:00 p.m.
All eyes were on Cruz, who staged a symbolic 21-hour speech before the government closed, to see if he would once again use delaying tactics to block a deal.
But he told reporters as Reid and McConnell took to the floor that he will not block the Senate agreement. "Of course not," he said. "I never had any intention to delay this vote. Delaying this vote would not accomplish things. The timing of the vote will make no difference to the outcome."
Cruz praised House Republicans for fighting until the end, but then chastised his Senate colleagues for striking a deal he said "failed the American people."
But more moderate Republicans had repeatedly warned that trying to take the government and debt hostage to kill Obamacare was terrible for the country and the Republican Party.
"We are now seeing the end of this agonizing odyssey that this body has been put through, but far more importantly, the American people have been put through," said Sen. John McCain (R-Ariz.). "It's one of the more shameful chapters that I have seen in the years that I have spent here in the Senate."
Besides keeping the sequester-level spending in the short-term deal, Republicans also got agreement from Democrats to beef up income verification requirements in Obamacare.
Other than that, the GOP got nothing out of the extended showdown that saw the party's approval ratings plummet.
The numbers were brutal. Several polls last week showed Republican popularity at record lows, with at least two surveys noting it was the GOP's lowest approval rating since they first began asking the question.
Some Republicans were far from satisfied after the ordeal.
"The deal that has been cut provides no relief to the millions of Americans who are hurting because of Obamacare," said Sen. Orrin Hatch (R-Utah), even as he declared it was "time to act like adults."
"We've got to solve this problem," Hatch said, adding McConnell got the best deal he could "under the circumstances."
He also expressed sympathy for Boehner, who was unable to coalesce his raucous members around a strategy to end the shutdown, and who could have avoided the whole episode by putting a clean government funding bill up for a vote in his chamber.
"I just feel badly about the way the speaker of the House has been treated by people on this side -- by members of his own party," Hatch said.
This article was updated after publication with additional reporting.
ALSO ON HUFFPOST:
How will Trump’s administration impact you? Learn more