The United States federal government shut down for the first time in 17 years on Tuesday, as Congress failed to end a bitter budget row after hours of dizzying brinkmanship.

Ten minutes before midnight, the White House budget office issued an order for many government departments to start closing down, triggering 800,000 furloughs of federal workers, and shutting tourists out of monuments like the Statue of Liberty, national parks and museums.

Prospects for a swift resolution were unclear and economists warned that the struggling US economic recovery could suffer if the shutdown drags on for more than just a few days.

Only workers deemed essential will be at their desks from Tuesday onwards, leaving government departments like the White House with skeletal staff.

Vital functions like mail delivery and air traffic control will continue as normal, however.

On a day of dysfunction and ugly rhetoric in the divided US political system, Republicans had repeatedly tied new government funding to attempts to defund, delay or dismantle President Barack Obama's signature health care law.

But each time their effort was killed by Obama's allies in the Democratic-led Senate, leaving the government in limbo when its money ran out at the end of the fiscal year at midnight Monday.

"This is an unnecessary blow to America," a somber Senate Majority Leader Harry Reid said on the Senate floor two minutes after the witching hour.

A few hours into the shutdown, Republicans in the House appointed delegates, or conferees, to try to negotiate with the Senate later Tuesday on a spending plan to get the government up and running again.

But if they still want to tinker with Obamacare, the Senate will not negotiate, an aide to Reid said.

"If the House follows through with their current plan, the Senate will vote to table the House's conference gambit shortly after convening. And we will be back at square one," the aide said.

Obama, heralding the first government shutdown since 1996, told US troops in a video that they deserved better from Congress, and promised to work to get the government reopened soon.

Sylvia Mathews Burwell, Obama's budget director, said agencies should execute plans for an "orderly shutdown", and urged Congress to swiftly pass bridge financing that would allow the government to open again.

Obama earlier accused Republicans of holding America to ransom with their "extreme" political demands, while his opponents struck back at his party's supposed arrogance.

House Speaker John Boehner rebuked Obama in a fiery floor speech after an unproductive call with the president.

"I didn't come here to shut down the government," Boehner said. "The American people don't want a shutdown, and neither do I."

Republicans accuse Obama of refusing to negotiate in good faith, but the White House says Obamacare is settled law and says there is no way to stop it from going into force, with a goal of providing affordable health care to all Americans.

The crisis is rooted in the long running campaign by "Tea Party" Republicans in the House to overturn or disable Obamacare -- the president's principal domestic political achievement -- key portions of which also come into force on Tuesday.

More broadly, the shutdown is the most serious crisis yet in a series of rolling ideological skirmishes between Democrat Obama and House Republicans over the size of the US government and its role in national life.

"One faction of one party in one house of Congress in one branch of government doesn't get to shut down the entire government just to re-fight the results of an election," Obama said, referring to his own re-election. He spoke in a televised statement from the White House.

Obama warned that a government shutdown could badly damage an economy which has endured a sluggish recovery from the worst recession in decades.

"A shutdown will have a very real economic impact on real people, right away. Past shutdowns have disrupted the economy significantly," Obama said.

Consultants Macroeconomic Advisors said it would slow growth, recorded at a 2.5 percent annual pace in the second quarter.

A two-week shutdown would cut 0.3 percentage point off of gross domestic production.

It would also have a painful personal impact on workers affected -- leaving them to dip into savings or delay mortgage payments, monthly car loan bills and other spending.

Stocks on Monday retreated as traders braced for the shutdown. The Dow Jones Industrial Average was down 128.57 points (0.84 percent) to 15,129.67.

Markets are likely to be even more traumatized if there is no quick solution to the next fast approaching crisis.

Republicans are also demanding Obama make concessions in the health care law to secure a lifting of the current $16.7 trillion debt ceiling, without which the United States would begin to default on its debts for the first time in history by the middle of October.

Meanwhile, a threatened partial shutdown of the US government will not hit foreign nationals lining up for visas to visit the United States, a US official said Monday.

"Activities carried out by the Bureau of Consular Affairs will continue domestically and abroad, so that means they will continue visa issuance as well as our passport operations," State Department spokeswoman Jen Psaki said.

US lawmakers have until midnight to prevent the first US government shutdown in 17 years by agreeing on budget legislation, but a deal appeared remote Monday.

Psaki also predicted there would be little immediate effect on the State Department's operations if the shutdown goes into force, and most staff would also not be given mandatory furloughs.

"If a government shuts down, initially, Department of State and USAID activities can be sustained on a limited basis for a short period of time," she told reporters.

She would not detail how long she was talking about, whether days or weeks, saying it was something "our budget wonks are still punching through."

And Psaki added that a trip by US Secretary of State John Kerry to Tokyo and Indonesia would go ahead as planned later this week.

"The State Department and USAID are national security agencies and will take steps to continue working to advance the national interest, even in the event of a shutdown and reduced staff," Psaki said.

Part of the reason why the department would be able to keep going was that its funding for the fiscal year 2013, which began on October 1, 2012, was only received in March.

So "we will have residual funds available beyond today as a result," Psaki said.

Most of its aid and assistance programs were also funded over several years, while some like visa services were financed through the fees charged, she said.

"Because we're able to sustain our operations on a limited basis, the vast majority of normal functions and operations will continue," Psaki stressed.