Less than four hours before the midnight deadline, both chambers of the US Congress - the Senate and House of Representatives - passed the legislation by 81-18 and 285-144 votes respectively to prevent the catastrophic debt default and increase the current debt ceiling of USD 16.7 trillion.
President Obama immediately signed into law the bill, the "Continuing Appropriations Act, 2014," which provides fiscal year 2014 appropriations for projects and activities of the Federal Government through Wednesday, January 15, 2014.
"The effective time for the continuing resolution begins on October 1, 2013," White House Press Secretary Jay Carney said, adding that the law also extends the nation's debt limit through February 7, 2014.
Hundreds of thousands of federal staff began returning to
work after the bill was passed in the Congress. The deadlock
over government spending in general and Obama's new health care programme in particular, had led to closing of national parks and monuments across the country. Federal agencies like NASA and the Environmental Protection Agency were also shut down during the 16-day period.
Conceding defeat Republican House Speaker John Boehner said, "We fought the good fight; we just didn't win."
Though the passage of the legislation ends global anxiety as the default would have had cascading impact on the world economy, the bipartisan deal reached by the Republicans and the Democrats with the support of the White House buys time only for a few months, before which they need to renegotiate the issue and find a lasting solution to their differences.
Soon after Obama signed the bill, the White House Office of Management of Budget issued a notice to federal agencies asking nearly eight lakh furloughed employees to resume their duties today.
"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," Sylvia M Burwell, OMB Director, said in a memorandum.
The bill was passed hours before the US Government was to exhaust its borrowing capacity.
"This is good news for developing countries and the world's poor. The global economy dodged a potential catastrophe," said World Bank President Jim Young Kim, reflecting a sigh of relief.
IMF Managing Director Christine Lagarde said looking forward, it will be essential to reduce uncertainty surrounding the conduct of fiscal policy by raising the debt limit in a more durable manner.
In addition to lifting the USD 16.7 trillion debt limit, the bill approves the government funding through January 15.
It also has provision for employees being paid for the period they were furloughed.
"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," Obama had earlier told reporters at the White House.
Obama said politicians in Washington have to "get out of the habit of governing by crisis."
"Hopefully, next time, it will not be in the 11th hour," Obama told reporters, calling for both parties to work together on a budget, immigration reform and other issues.
As he left the podium, Obama was asked whether he believed America would be going through all this political turmoil again in a few months. He replied, "No."
The end to the fiscal impasse is being described in the US media as a defeat of the Republican party.
"Congressional Republicans conceded defeat on Wednesday in their bitter budget fight with President Obama over the new health care law," The New York Times wrote.
The shutdown have come at a steep cost, with Standard and Poor's putting it at USD 24 billion out of the economy.