The US Senate has passed legislation raising the Treasury Department's borrowing authority, which would end the government shutdown that has crippled the country since October 1.

The Senate has now sent the measure to the House of Representatives for final passage, before being signed into law by president Barack Obama.

"Once this agreement arrives on my desk, I will sign it immediately," Mr Obama said shortly after the Senate passed the bill.

"We'll begin reopening our government immediately. We will begin to lift this cloud of uncertainty and unease from our businesses and from the American people."

Senate majority leader Democrat Harry Reid announced the deal that calls for reopening the federal government with a temporary budget until January 15 and extending US borrowing authority until February 7.

Analysis

Michael Vincent, ABC North America correspondent

In a few hours the US Congress will vote to avert a disaster the White House has called "entirely manufactured".

After 16 days, the US government is set to reopen and the US Treasury is going to be given the ability to pay its bills at least until early next year.

For the House Republicans who brought on this crisis, it's a massive loss of face because they have not come close to achieving their objective of defunding or delaying Mr Obama's healthcare reforms.

But when a radio host asked him to compare his situation to the Americans at the Alamo or the French seeing the Germans coming over the border, speaker John Boehner responded by saying "there’s no giving up on our team".

He also said: "we fought the good fight, there’s no reason for our members to vote no today."

The White House has been asked if it's a complete win for the president.

Spokesman Jay Carney says: "there are no winners from this outcome – the American people have paid a price".

The 11th-hour compromise came just hours before the point where the US Treasury simply would have been unable to borrow money to meet its very big debt obligations.

Mr Obama also said the government and Congress had a lot of work to do to regain the trust of the American public.

"We can begin to do that by addressing the real issues that they care about," he said.

"I've said it before, I'll say it again ... I am eager to work with anybody - Democrat or Republican, House or Senate members - on any idea that will grow our economy, create new jobs, strengthen the middle class and get our fiscal house in order for the long-term.

"My hope and expectation [is that] everybody has learned that there's no reason why we can't work on the issues at hand, why we can't disagree between the parties whilst still being agreeable."

White House spokesman Jay Carney says the priority now is for the deal to be passed and passed quickly.

"The president believes that the bipartisan agreement announced by the leaders of the US Senate will re-open the government and remove the threat of economic brinkmanship that has already harmed middle-class families, American businesses and our country's economic standing in the world," he said.

On Thursday (local time), the US economy was to sail into uncharted waters where the Treasury would no longer be able to borrow more to meet its obligations and avert a devastating debt default.

The only way to avert that peril, which could send global markets into turmoil and threaten another recession, would be for Congress to agree to raise the US government's $16.7 trillion debt ceiling.

Senator John McCain says the deal marks the "end of an agonising odyssey" for Americans.

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

Tea Party Republicans demanded changes to "Obamacare"

Republican Senators Ted Cruz and Rand Paul, two vocal opponents to the deal, said they would not attempt to delay it further.

"The House of Representatives has taken a bold stance listening to the American people," he said.

"But unfortunately, the United States Senate has refused to do likewise. 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 millions of Americans.

House conservatives backed by the Tea Party movement have thus far thwarted votes on the debt ceiling and on passing a budget, demanding concessions from Mr Obama.

Democrats have refused to allow Republicans to hold those issues to "ransom" with attempts to slash spending or dismantle the president's landmark health insurance reform.

Deal includes Republican-led push for long-term budget talks

But the Senate deal includes a mechanism that forces lawmakers into entering long-term budget negotiations, with recommendations due by December 13.

House Republican speaker John Boehner has proved unable to control his restive caucus.

With the Tea Party to his right insisting on standing firm, Mr Boehner has thus far proved unwilling to use minority Democratic votes to pass even an interim budget or a temporary debt-ceiling hike.

On Tuesday, House Republicans floated a plan broadly similar to the Senate's, but which would have constrained aspects of so-called Obamacare and removed the administration's ability to use "extraordinary measures" to temporarily pay obligations beyond a debt ceiling.

It stood no chance of passing the Senate and Republican representative Scott Rigell said he expected Mr Boehner would eventually break with the hardliners and call a vote.

Mr Boehner said on Wednesday his chamber would not block the Senate's new plan to end the shutdown and raise the federal debt.

In a brief statement, Mr Boehner said his Republican lawmakers would continue the fight against Mr Obama's healthcare overhaul and for fiscal responsibility.

"But blocking the bipartisan agreement reached today by members of the Senate will not be a tactic for us," he said.

Furloughed workers to receive backpay

The debt-ceiling deal also provides relief through backpay to workers furloughed in the government shutdown.

About 800,000 government employees were forced off the job when Congress could not agree on a budget for the new fiscal year.

In some departments, including the Environmental Protection Agency, 95 per cent of staff were deemed non-essential personnel and were effectively unemployed at the start of this month.

"Employees furloughed as a result of any lapse in appropriations which begins on or about October 1, 2013, shall be compensated at their standard rate of compensation, for the period of such lapse," according to the text of the deal provided by Senate majority leader Harry Reid's office.

What is the US debt ceiling?

The US government spends more money than it makes on things like social security payments, wages and interest it owes on loans.

It takes loans in the form of bonds from the US Treasury to make up its cash shortfall.

US Treasury bonds are one of the world's safest investments and are held by countries around the world.

The debt ceiling is a rule put in place by Congress that limits on how much money the government can borrow - the current debt ceiling stands at $US16.7 trillion.

If the government needs to borrow more than this, Congress has to vote on raising the debt ceiling

The US has already reached its debt ceiling and has been using its cash reserves to pay bills.

That money is set to run out on October 17.

After that, we enter uncharted territory as the US government continues to try and pay its bills.

At the end of October the US is due to pay interest on its Treasury bonds, but without a higher debt ceiling it's unlikely it will be able to do so.

If the US defaults on this repayment there will be implications for the global powers who invest in these bonds and the bonds will no longer be considered safe.