Updated 12:31 a.m. President Barack Obama signed a last-minute Congressional deal early Thursday morning to avert a damaging debt default and to reopen the government after a more than two-week shutdown.



The Office of Management and Budget said previously furloughed federal workers should report to work Thursday morning and Congressional leaders began to appoint budget negotiators to find a longer term budget solution.

The U.S. House of Representatives voted to pass the stopgap bill shortly after 10 p.m. Wednesday. It got through relatively easily: 285 members voted for the legislation and 144 against it. After much opposition, House Speaker John Boehner was one of 87 Republicans to vote for the plan; Representative Paul Ryan was among those who voted against it.

The Senate passed the same bill 81 to 18 shortly after 8 p.m.

"I want to thank the leaders of both parties for getting us to this point," Obama said shortly after the Senate vote. "We'll begin reopening our government immediately, and we can begin to lift this cloud of uncertainty and unease from our businesses and from the American people."



Treasury Secretary Jack Lew was also pleased.

"We welcome the bipartisan action Congress is taking to resolve this crisis," Lew said in a statement late Wednesday. "At the same time, we remain committed to reaching agreement on a balanced fiscal package that will create jobs, grow our economy, and put us on a path toward long-term fiscal sustainability. Without question, it will require difficult choices."

While the deal in Congress is a temporary solution that sets up another showdown early next year, Wall Street reacted positively.

Major U.S. stock indexes rose more than 1 percent Wednesday on optimism that lawmakers were finally reaching a deal to end the 16 day fiscal impasse. U.S. stock futures also rose in after-hours trading.

(Read more: El-Erian: What follows this Congressional deal?)

Earlier Wednesday, Senate Majority Leader Harry Reid, the top Democrat, and Republican leader Mitch McConnell announced an agreement after days of bickering. Key Republican opponents Senator Ted Cruz of Texas and Boehner said they would not block the deal.

Cruz nonetheless called the deal "terrible" shortly before voting no. "The fight against Obamacare must continue in the face of Washington's apathy," he said.

Weeks of bitter fighting among Democrats and Republicans over President Obama's signature healthcare reform law led to a partial government shutdown on Oct. 1, sidelining hundreds of thousands of federal workers. Cruz and other Republicans backed by the conservative, small government Tea Party movement want to repeal or delay the healthcare law.

The initial fight over healthcare turned into a bigger argument over the debt ceiling, threatening a default that would have reverberations around the world.

The Club for Growth, a conservative advocacy group that backs lower government spending, urged the Senate and House to vote "no" on a deal.

(Read more: CNBC explains the debt ceiling)

"If we don't get a default, it would be like Y2K. People were staying up all night worried about what would happen during that deadline. Then nothing happened," said David Keeble, global head of interest rate strategy with Credit Agricole Corporate & Investment Bank in New York, referring to worries about the millennium computer bug in 2000.

Senator John McCain, whose fellow Republicans triggered the crisis with demands that President Barack Obama's signature "Obamacare" healthcare law be defunded, said on Wednesday the deal marked the "end of an agonizing odyssey" for Americans.

"It is one of the most shameful chapters I have seen in the years I've spent in the Senate," said McCain, who had repeatedly warned Republicans not to link their demands for Obamacare changes to the debt limit or government spending bill.