Federal employees head back to work as shutdown ends Critical functions of government went on as usual, but the closure and potential default weighed on the economy and spooked the financial markets. Standard & Poor's estimated the shutdown has taken $24 billion out of the economy. Mr Obama hailed the legislation - which adhered strictly to the terms he laid down when the twin crises erupted more than three weeks ago. "We'll begin reopening our government immediately and we can begin to lift this cloud of uncertainty from our businesses and the American people," he said. Republican House of Representatives Speaker John Boehner said: "We fought the good fight. As the deal came together earlier Wednesday, the stock market surged on the prospect of an end to the crisis that had threatened to shake confidence in the U.S. economy both at home and abroad. IMF managing director Christine Lagarde welcomed the deal but said the shaky American economy needs more stable long-term finances. "It will be essential to reduce uncertainty surrounding the conduct of fiscal policy by raising the debt limit in a more durable manner," Lagarde said in a statement. The Republican-controlled House of Representatives voted 285-144 in favor of the bill, even though most Republicans voted against it. In the Democrat-controlled Senate, approval was even more lopsided, 81-18. House Republicans sparked the crisis on Oct. 1 when they refused to fund the government unless Obama agreed to defund or delay his health care law, known as "Obamacare." The government shutdown was soon overshadowed when House Republicans also refused to up the government's borrowing authority so the U.S. could pay its bills, raising the specter of a catastrophic default. Obama refused to budge, proclaiming repeatedly that he would not to pay a "ransom" in order to get Congress to pass normally routine legislation. Conservative Sen. Ted Cruz of Texas championed the Republican strategy of using both deadlines as weapons that could be used to gut Obama's Affordable Care Act, which launched its online exchanges for millions of uninsured Americans on Oct 1. The Democrats fended off every challenge to Obamacare, while Republicans in the House failed to collect enough votes to pass their own plan to end the bitter standoff. Boehner, in a bold move, ended up putting the compromise bill to a vote in the House knowing most Republicans didn't support it. Undaunted, he vowed Republicans were not giving up on the fight to bring down U.S. debt and cripple Obamacare. The agreement gives the parties some time to cool off and negotiate a broader spending plan. The government will remain open through Jan. 15 and the deadline for default on debts is now Feb. 7. Some members of Congress were already bracing for another battle. "All this does is delay this fight four months," Republican Congressman Mo Brooks said. We need to get to the underlying cause of the problem, which is our out-of-control spending and deficits, and fix it before it's too late and we go down the toilet to bankruptcy because that's where America is headed. Several polls showed a steep decline in public approval for Republicans. Republican Sen. John McCain said the American people clearly disapprove of how Republicans, and also Democrats and the president, handled the budget gridlock. "Hopefully, the lesson is to stop this foolish childishness," McCain said on Thursday on CNN. After Obama signed the bill, Sylvia Mathews Burwell, director of the Office of Management and Budget, issued a memorandum ordering department heads to "open offices in a prompt and orderly manner." They will be paid for the time they were forced off the job. Washington's Smithsonian Institution declared on Twitter that it was back in business, announcing that its 19 museums would reopen Thursday. The National Zoo was set to reopen Friday.