Media playback is unsupported on your device Media caption President Obama: "Time is running out"

President Barack Obama has said a potential US government shutdown is "entirely avoidable" as only a few hours remain to avert it.

Mr Obama criticised Republicans for trying to refight the last election as they seek to link the budget to delaying his health care law.

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.

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.

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

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 regardless of whether there is a shutdown.

No 'furloughed' bills

A shutdown would have "a very real economic impact on real people, right away," Mr Obama said on Monday afternoon, as just under seven hours remained until the deadline, adding it would "throw a wrench" into the US recovery.

"The idea of putting the American people's hard-earned progress at risk is the height of irresponsibility, and it doesn't have to happen."

This is an important moment and, if no-one blinks before midnight, the days ahead will test the mettle of politicians on both sides

While more than 700,000 federal employees are expected to be sent home on unpaid leave or furloughs; "what will not be furloughed is the bills that they have to pay," Mr Obama said.

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

"Does anybody truly believe that we won't have this fight again in a couple more months?" Mr Obama said, explaining why he and his congressional allies would not negotiate the law.

Earlier, the Democratic-led Senate voted 54-46 against a bill from the Republican-led House of Representatives to fund the government only if President Obama's healthcare law was delayed a year.

'Bullies'

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".

Following Mr Reid's pledge, the House passed another bill to fund the government on Monday evening - but with a one-year delay to one of the law's primary elements not due to begin on 1 October, the individual mandate.

"The American people don't want a shutdown and neither do I," House Speaker John Boehner said, but added the healthcare law was "having a devastating impact... Something has to be done".

The Senate again rejected the Obamacare provisions with less than three hours before the deadline.

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

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.

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.

Borrowing crisis

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

On that date, 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 also demanded a series of policy concessions - including on the president's health law and on financial and environmental regulations - in exchange for raising the debt ceiling.

Earlier this month, Treasury Secretary Jack Lew said that unless the US was 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.