The bill has the backing of Speaker John Boehner. Boehner taps House Dems

After two weeks of false starts and Republican infighting, Congress finally voted late Wednesday night to end the first government shutdown in 17 years and to avert a default on U.S. debt.

But the deal brokered at the last minute between Senate Majority Leader Harry Reid and Minority Leader Mitch McConnell does little besides setting up more budgetary battles: government funding runs dry, once again, in January, and the borrowing limit must be lifted in February.


For now, though, the crisis that has gripped Washington is lifting.

( PHOTOS: Senators vote on budget deal)

President Barack Obama signed the bill to reopen the government and raise the debt ceiling early Thursday morning, the White House said in a statement, as the Office of Management and Budget alerted government workers to get ready to return to work on Thursday.

“Today, the president signed a continuing resolution that brings employees back to work and reopens many government functions. All employees who were on furlough due to the absence of appropriations may now return to work,” OMB director Sylvia Mathews Burwell said in a memo to the heads of executive departments and agencies. “You should reopen offices in a prompt and orderly manner.”

In a press release, OMB said they would be working with the various agencies in the coming days to “make the transition back to full operating status as smooth as possible.”

( Also on POLITICO: Last shutdown's lessons don't apply)

The Office of Personnel Management also updated its website overnight to inform federal employees to return to work on their next scheduled day, which was Thursday for most, unless instructed otherwise.

Obama delivered a short statement from the White House before the House voted. “Tonight, the Republicans and Democrats in Congress came together around an agreement that will reopen the government and remove the threat of default from our economy,” he said.

The final act of the shutdown saga began in the Senate, with 81 senators voting yes, and 18 voting against the compromise negotiated by the chamber’s leaders. The Senate’s No. 2 Republican, John Cornyn of Texas, voted against the bill, as did prominent GOP senators such as Marco Rubio of Florida, Mike Lee of Utah and Ted Cruz of Texas.

( POLITICO's full coverage of the debt ceiling crisis)

The House then moved to clear the legislation 285-144, relying mostly on Democratic votes in the Republican controlled chamber. Just 87 Republicans supported the bill while 198 Democrats voted for it. The bill was opposed by 144 Republicans , including House Budget Committee Chairman Paul Ryan.

Once again, Speaker John Boehner had to rely on House Minority Leader Nancy Pelosi’s Democratic Caucus to carry the bill to passage. It’s a clear violation of the much-talked-about Hastert Rule, a mantra that the House speaker should not bring legislation to the floor without the support of a “majority of the majority” of his members. The fiscal cliff legislation and relief for Hurricane Sandy passed with mostly Democratic votes, as well.

That House Republicans took up the Senate bill marked a stunning reversal for the speaker, who had backed his conservative wing’s drive to gut Obamacare as part of the government shutdown fight. The bill that cleared Congress doesn’t alter Obamacare at all. But Boehner tried everything else and was unable to get his House Republicans to rally around another plan.

( Also on POLITICO: 18 GOP senators oppose deal)

McConnell and Reid worked overtime the past three days to hammer out a bipartisan agreement after a House bill collapsed on Tuesday.

Alongside the bill, the Senate agreed to a provision that House and Senate leaders would appoint negotiators to hash out a budget agreement by Dec. 13. Republicans objected 21 times to similar agreements earlier this year.

“This compromise we reached will provide our economy with the stability it desperately needs. It’s never easy for two sides to reach consensus. It’s really hard, sometimes harder than others. This time was really hard,” Reid said. “The country came to the brink of a disaster. But in the end, political adversaries set aside their differences and disagreement to prevent that disaster.”

From the Senate floor, McConnell said, “For today, the relief we hope for is to reopen the government, avoid default and protect the historic cuts we achieved under the Budget Control Act.”

( PHOTOS: Debt ceiling fight: 20 great quotes)

McConnell’s caucus showed remarkable unity after he briefed them on the contours of the deal. Conservatives, including Cruz, decided not to drag out procedural votes to delay final passage of the deal.

“Delaying this vote would not accomplish anything,” Cruz said. “The focus is and should be on the substance of providing real relief for the American people. This deal doesn’t do that and that’s why I intend to vote no, but there is nothing to be benefited by delaying this vote a couple of days, versus having it today.”

But some Republicans were also relieved to see the saga come to a close.

“It’s obvious that 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. It’s one of the more shameful chapters that I have seen in the years that I have spent here in the Senate,” Sen. John McCain (R-Ariz.) said.

The legislation also includes a McConnell-written proposal that would allow Congress to disapprove of the debt-ceiling increase. Lawmakers will formally vote on rejecting the bump of the borrowing limit - if it passed, it could be vetoed by Obama.

The deal would also deliver back pay to furloughed federal workers, require a study of income verification for people seeking health-insurance subsidies under the Affordable Care Act and also allows the Treasury Department to use extraordinary measures to pay the nation’s bills if Congress doesn’t raise the debt ceiling in a timely fashion.

McConnell was pushing hard to include language to give federal agencies more flexibility to implement the sequester, something Reid was objecting to Wednesday morning, sources say. Democrats argued that provision would make it harder to eliminate the sequester in the future and it was not included in the final package. Another round of automatic budget cuts will take hold in January, mostly hitting defense spending.

Jennifer Epstein, Seung Min Kim, Tal Kopan and Ginger Gibson contributed to this report.