Republicans demanded a king-size ransom and are poised to walk away with virtually nothing.

The majority House GOP has flamed out, unable to settle on any proposal to lift the debt ceiling and avert a catastrophic default. And now, according to Senate sources, Speaker John Boehner (R-OH) has agreed to vote on a deal negotiated by Majority Leader Harry Reid (D-NV) and Minority Leader Mitch McConnell (R-KY).

The expectation is the House will go first, the sources said, which could speed up the process of Senate passage by several days if senators stall. Most House Republicans will probably vote against the bill, which means Boehner will have to pass it with the support of Democrats — a move he has tried so hard to avoid he shut down the government over it 16 days ago and has come within one day of hitting the debt ceiling deadline.

“No decision has been made about how or when a potential Senate agreement could be voted on in the House,” said Michael Steel, a spokesman for Boehner.

The Senate deal lifts the debt ceiling through Feb. 7, re-opens the shuttered government through Jan. 15 and sets up a bicameral budget conference tasked with sending policy recommendations by Dec. 13. It will include a provision to enforce a part of Obamacare where subsidy recipients have to verify their income eligibility first. It won’t include a previously considered, labor union-backed proposal to delay a reinsurance tax under the health care law. Ultimately neither side will make major policy concessions.

“I don’t envy the position Speaker Boehner has been in but to allow it to come up for a vote and to get it resolved on behalf of the nation,” Sen. Kelly Ayotte (R-NH) said Wednesday on CNN. Even if it lacks GOP support? “I know he’s been in a difficult position but we’re at the time when we have to get it done,” she said, “so I believe that he needs to bring it up for a vote.”

The move would be a total surrender for Republicans, who had demanded a defunding of Obamacare (or at least a dismantling of it) to fund the government and a grab-bag of conservative goodies to lift the borrowing limit ahead of a Thursday deadline. The shutdown that took place on Oct. 1, egged on by Sen. Ted Cruz (R-TX) and his arch-conservative allies, has badly damaged the GOP’s standing among voters, multiple polls show.

“It’s very, very serious,” said Sen. John McCain (R-AZ), as quoted by the New York Times. “Republicans have to understand we have lost this battle, as I predicted weeks ago, that we would not be able to win because we were demanding something that was not achievable.”

Remarkably, the leader of one of the conservative advocacy groups who goaded the GOP into the dead-end shutdown fight over Obamacare — against party leaders’ better instincts — acknowledged that the law won’t be repealed while Democrats are in power.

“Well, everybody understands that we’ll not be able to repeal this law until 2017,” Michael Needham, the CEO of Heritage Action, said Wednesday on Fox News. “We have to win the Senate and win the White House. Right now it is clear that this bill is not ready for prime time. It is clear the bill is unfair.”