WASHINGTON (Reuters) - U.S. lawmakers were poised to vote late Wednesday on a bipartisan 11th-hour Senate deal to break the fiscal impasse in Washington and avert a historic debt default.

Senator Susan Collins (R-ME) is trailed by reporters as she walks with Senator John McCain (R-AZ) in the U.S. Capitol in Washington October 16, 2013. REUTERS/Kevin Lamarque

With the government’s borrowing authority set to run out on Thursday, House of Representatives Speaker John Boehner said he would allow the deeply divided House to vote on the Senate plan for a short-term increase in the debt limit and a government reopening. It is expected to pass with mostly Democratic votes.

The agreement would extend U.S. borrowing authority until February 7, although the Treasury Department would have tools to temporarily extend its borrowing capacity beyond that date if Congress failed to act early next year.

The agreement also would fund government agencies until January 15, ending a partial government shutdown that began with the new fiscal year on October 1.

The Republican-controlled House and the Democrat-controlled Senate were expected to approve the fiscal deal later on Wednesday, clearing the way for Obama to sign it into law before the debt ceiling is reached late on Thursday.

The deal represents a bruising political defeat for Republican conservatives who had demanded changes to President Barack Obama’s healthcare law before they would agree to fund the government.

Several House Republicans said Boehner’s leadership position would not be at risk in the fallout. The speaker earned a standing ovation at an afternoon meeting of House Republicans, and Republican Representative John Fleming of Louisiana, a Tea Party activist, said Boehner’s stock had risen because he “hung in there with us.”

“Our drive to stop the train wreck that is the president’s healthcare law will continue,” Boehner said in a statement, adding the House had fought Obama “with everything it has” and he would not block the bipartisan Senate agreement.

But opinion polls show Republicans have taken a heavy political beating in the showdown as they head into next year’s congressional elections.

“The deal we’ve got, you know the old saying ‘we may have left a little bit on the table?’ We left everything on the table,” Republican Senator Lindsey Graham of South Carolina said. “This has been a very bad two weeks for the Republican brand, conservatism.”

Republican Senator John McCain of Arizona called the political stalemate, which rattled financial markets and partially shuttered the federal government, “one of the most shameful chapters I have seen in the years I’ve spent in the Senate.”

Lawmakers are racing to pass a deal before the U.S. Treasury hits its $16.7 trillion borrowing limit, which is expected by the end of the day on Thursday. The government will have enough cash on hand to meet its obligations for a few more days, but officials have warned an economically devastating default could quickly follow.

The conservative anti-tax group Club for Growth and the conservative Heritage Action group urged Republicans to reject the agreement and said they would consider it a “key vote” when grading lawmakers as they head into the campaign season.

The Chamber of Commerce also told lawmakers it would be considered a “key vote” but urged passage of the deal.

‘GET IT DONE’

Democratic leaders said House Democrats would provide the votes necessary to get the agreement passed even if a majority of House Republicans oppose it.

In the House, there now are 232 Republicans and 200 Democrats, with three vacant seats. A bill needs 217 votes to pass.

“We’ll get it done,” Democratic Representative Steve Israel of New York, head of the party’s congressional campaign committee, told reporters.

The deal between Senate Majority Leader Harry Reid and Republican leader Mitch McConnell gives Obama most of what he had demanded for months: A straightforward debt limit hike and government funding bill.

The extension is shorter than the one year Obama had asked for, however, and promises another budget fight in a few months. Under the deal, a House-Senate negotiating committee will be formed to examine a broader budget agreement, with a deadline of December 13 for its work.

The White House said it hoped lawmakers had learned the painful consequences of such budget stalemates, although few in Washington were talking optimistically about avoiding future showdowns.

“The experience that we’ve all had demonstrates the kind of hyper-partisanship that was the problem in the past, especially in one house, continues to be a challenge,” White House spokesman Jay Carney said.

“We would simply hope that this experience, if and when it’s over, would remind all of us here that these kinds of crises only create harm to the American people and to the American economy,” he said.

The deal includes income verification procedures for those seeking subsidies under the healthcare law, but Republicans surrendered on their attempts to include deeper changes to the law, including the elimination of a medical device tax used to help pay for it.

Republican Tea Party firebrands, such as Senator Ted Cruz of Texas, in recent weeks blocked a government funding bill and managed to shut down the government as they demanded changes to Obama’s signature healthcare law in return.

But Cruz said on Wednesday he would not delay passage of the bipartisan deal, although he bitterly criticized it and promised to keep fighting for changes to the healthcare law.

“Unfortunately, once again it appears the Washington establishment has refused to listen to the American people,” Cruz told reporters.

“The United States Senate has stayed with the traditional approach of the Washington establishment of maintaining the status quo and doing nothing to respond to the suffering that Obamacare is causing to millions of Americans,” he said.

Reid and McConnell took to the Senate floor to announce the agreement. McConnell acknowledged many Republicans would not be happy with the result but said a debt default must be avoided.

“This is far less than many of us had hoped for. But it’s far better than what some had sought,” McConnell said.