Defeat has bitter taste for Tea Party John Boehner, the Republican House speaker, arrives at Capitol Hill in Washington After weeks of threats, filibusters and bills designed to gut Barack Obama's healthcare law, combined with a government shutdown and possible sovereign default, the Republican retreat was all but complete on Wednesday. "We have lost this battle," said John McCain, the Arizona Republican senator. The bitterness in Republican ranks was all the deeper for the fact that Mr McCain, and many colleagues, warned for weeks that conservatives would lose a budget battle with Democrats if they made the fight about "Obamacare." John Boehner, the Republican House speaker, also advised his members that making approval of the budget conditional on the White House gutting Mr Obama's own law would fail. But under pressure from his Tea Party-tinged caucus, Mr Boehner did exactly that, leaving himself with little room to move when the White House called his bluff and Senate Republicans abandoned him this week. With Democrats refusing to countenance any changes to the healthcare reforms as part of budget negotiations and the debt ceiling stand-off, Senate leaders stepped into the breach to broker a compromise, announced on Wednesday. The standing of Washington's leaders, including Mr Obama, has fallen over the two weeks that the government has been closed. But Republicans have suffered most, which may damage their chances in next year's midterm congressional elections, especially in the Senate. The Republican civil war undermines the party's standing with voters and increases the chances of damaging pre-election primary contests engineered by the Tea Party, something that helped derail their Senate campaigns in 2010 and 2012. A deal struck by Harry Reid, the Democratic majority leader in the Senate, and Mitch McConnell, the Republican minority leader, will reopen the government and extend the debt ceiling into early next year. It also restarts budget negotiations, meaning the fiscal fights will continue. The package contained no substantive concessions on healthcare reform. "This package is just a joke, but live and learn," said Lindsey Graham, a Republican senator from South Carolina. We'll be doing this again in a couple of months. But even as the two sides prepared to rejoin their perennial budget wars, the White House believes it has set an important precedent, that it will not negotiate over the budget under threat of a debt default. The White House welcomed the Senate compromise but said the two-week shutdown had damaged the US economy and the incomes of ordinary Americans. "There has already a price that has been paid," said Jay Carney, Mr Obama's spokesman. Mr Boehner's weakness remains his ability to persuade a group in his 232-strong caucus, estimated to be between 30 and 80 members, to compromise their hard line on the budget and the president's healthcare reforms. This package is just a joke, but live and learn. We'll be doing this again in a couple of months Lindsey Graham, Republican senator Even after repeatedly modifying his plans to appease them the House speaker had to withdraw his final proposal because he could not persuade enough of his members to support it. In the 435-strong chamber, any measure needs 218 votes to pass. Tim Huelskamp, of Kansas, one of the leading Tea Party Republicans, told the Financial Times that he only needed to pull about 13 to 14 votes away from the speaker to scuttle his initiatives. Ted Cruz, the new Texas senator and the Tea Party favourite who led the charge to make healthcare reforms central to the budget talks, lashed out at all comers after the Senate compromise. The Washington establishment is maintaining the status quo. Nobody should be surprised at the resistance to change," he said. But Mr Cruz also said he would not block a vote on the compromise. The Tea Party Republicans" campaign on healthcare has had substantial backing from outside groups, notably Heritage Action, an arm of the conservative Heritage Foundation think-thank. Michael Needham, the head of Heritage Action, who had called for a fight over "Obamacare," angered many Republicans when he told Fox News that "everyone understands" the healthcare reforms could not be repealed until at least 2017, after the next presidential election. Former Republican senator Judd Gregg, chief executive of the Securities Industry and Financial Markets Association, said the Republican brand of fiscal responsibility had been significantly damaged. But he said Republicans had a chance to rebuild their image in the budget talks, adding that Mr Obama had also been hurt. "Everybody has a fair amount of egg on their face," Mr Gregg said.