Media playback is unsupported on your device Media caption The US government shutdown - explained in 60 seconds

The US Senate has rejected a budget bill passed by the Republican-led House of Representatives, with just hours left to avert a government shutdown.

The Democratic-led Senate voted 54-46 against the bill, which would fund the government only if President Obama's healthcare law were delayed a year.

If no agreement is reached by midnight (04:00 GMT), the government will close all non-essential federal services.

The shutdown would be the first in the US in 17 years.

Analysis The Republican leadership in the House are not stupid. But they are trapped by their radicals. Any backing away from confrontation could brand John Boehner an Obama-loving apostate, and cost him his job. The same goes for his members who don't want to be deselected in primary elections. This is not about ideology. The Republicans in the House are all conservatives, all hate "Obamacare" and think government spending is irresponsibly out of hand. This is about strategy. It is an argument between those Republicans who want to rush to the barricades and go down in a blaze of glory, heroes of the revolution to like-minded Tea Party types, and those who think it is a pointless charge but don't want to be labelled traitors and cowards.

More than 700,000 federal government workers could be sent home on unpaid leave, with no guarantee of back pay once the deadlock is over.

One of the key points of contention in the political stalemate has been President Barack Obama's healthcare law, popularly known as Obamacare.

Republicans in the House of Representatives - and their allies in the Senate - have demanded the law be repealed or stripped of funding as a condition for continuing to fund the government.

Major portions of the law, which passed in 2010 and has been validated by the US Supreme Court, are due to take effect on Tuesday.

After the Senate vote on Monday afternoon, the chamber's Democratic majority leader blamed Republicans for the imminent halt to all non-essential government operations.

"It will be a Republican government shutdown, pure and simple," said Senate Majority Leader Harry Reid of Nevada, referring to the Republicans as "bullies".

"We are not going to negotiate on this. We have done everything we can to be fair and reasonable."

Following Mr Reid's pledge, Republican House Speaker John Boehner told reporters the House would not pass a budget bill that did not include concessions from the Democrats regarding Mr Obama's healthcare law.

'Potential default'

Media playback is unsupported on your device Media caption President Obama: "No negotiations under threat"

In addition to the threat of a shutdown, a second fiscal deadline is approaching in the coming weeks. About 17 October, the US government will reach the limit at which it can borrow money to pay its bills, the so-called debt ceiling.

House Republicans have demanded a series of policy concessions - notably on the president's health law and on financial and environmental regulations - in exchange for raising the debt ceiling.

Although there were no reports that negotiations over either the budget or the debt ceiling were underway on Monday, Mr Obama said he was "not at all resigned" to a government shutdown.

But he warned there could not be "any kind of meaningful negotiations under the cloud of potential default" on the government's debt.

"Our currency is the reserve currency of the world," Mr Obama said after an Oval Office meeting with Israeli Prime Minister Benjamin Netanyahu.

"We don't mess with that. And we certainly don't allow domestic policy differences on issues that are unrelated to the budget to endanger not only our economy but the world economy."

State department will be able to operate for limited time

Department of defence would continue military operations

Department of education would still distribute $22bn (£13.6bn) to public schools, but staffing would be severely hit

Department of energy - 12,700 staff would be sent home, 1,113 remain to oversee nuclear arsenal

Department of health and human services to send home more than half of staff

The Federal Reserve, dept of homeland security, and justice dept would see little or no disruption

US Postal Services would continue as normal

Smithsonian institutions, museums, zoos and many national parks would be closed Source: Washington Post

The bill the Senate rejected on Monday was passed the day before by the House of Representatives. That bill would have delayed the implementation of the healthcare law and repealed a $29bn (£17.9bn) medical device tax.

Media playback is unsupported on your device Media caption Reid: "This is a fool's errand"

Mr Obama and his fellow Democrats in the US Senate have vowed to reject any House bill that touches the health law.

Some Democrats, including Mr Reid and Democratic House Minority Leader Nancy Pelosi, have called on Mr Boehner to put the Senate bill up for a vote in the House.

They say a budget bill unencumbered with a delay of the health law could pass the House with Democrats joining a small number of Republicans.

If the government does shut down on 1 October, national parks and Washington's Smithsonian museums would close, pension and veterans' benefit cheques would be delayed, and visa and passport applications would go unprocessed.

Programmes deemed essential, such as air traffic control and food inspections, would continue.

The defence department has advised employees that uniformed members of the military will continue on normal duty, but that large numbers of civilian workers will be told to stay home.

Borrowing crisis

As lawmakers grapple with the impending shutdown, the 17 October deadline for extending the government's borrowing limit looms even larger.

Earlier this month, Treasury Secretary Jack Lew said that unless the US were allowed to extend its borrowing limit, the country would be left with about $30bn (£18.5bn) to meet its commitments, which on certain days can be as high as $60bn.

A failure to raise the limit could also result in the US government defaulting on its debt payments.

Washington faced a similar impasse over its debt ceiling in 2011. Republicans and the Democrats only reached a compromise on the day the government's ability to borrow money was due to run out.

That fight was resolved just hours before the country could have defaulted on its debt, but nevertheless it led to ratings agency Standard & Poor's downgrading the US for the first time ever.

The 2011 compromise included a series of automatic budget cuts known as the "sequester", which came into effect earlier this year.

The US government has not undergone a shutdown since 1995-96, when services were suspended for a record 21 days.

Republicans demanded then-President Bill Clinton agree to their version of a balanced budget.

After weeks of negotiation, they reached a compromise similar to what they discussed prior to the shutdown.