The move comes amid a stand-off related to Donald Trump’s call for five billion dollars to build his border wall with Mexico.

As Donald Trump and US congress clash over the American president’s call for five billion dollars (£3.9 billion) to build a border wall with Mexico, US agencies are preparing for a partial government shutdown set to begin at midnight on Friday (5am on Saturday GMT).

As Donald Trump and US congress clash over the American president’s call for five billion dollars (£3.9 billion) to build a border wall with Mexico, US agencies are preparing for a partial government shutdown set to begin at midnight on Friday (5am on Saturday GMT).

The dispute could affect nine of 15 cabinet-level departments and dozens of agencies, including the departments of Homeland Security, transportation, the interior, agriculture, state and justice, as well as national parks and forests.

More than 800,000 federal employees would see their jobs disrupted, including more than half who would be forced to continue working without pay.

The US postal service, busy delivering packages for Christmas, would not be affected by any government shutdown because it is an independent agency.

US president Donald Trump (AP)

– Work goes on

Social Security cheques will still go out. Troops will remain at their posts. Doctors and hospitals will receive their Medicare and Medicaid reimbursements. In fact, virtually every essential US government agency, like the FBI, the border patrol and the coast guard, will remain open. Transportation security administration officers will continue to staff airport checkpoints.

However, hundreds of thousands of federal workers will be forced off the job, and some services will be halted. Even after funding is restored, the political repercussions could endure.

According to a report by Democrats on the senate appropriations committee, more than 420,000 federal employees deemed essential would continue to work without pay during a partial shutdown, including about 41,000 law enforcement and corrections officers and nearly 150,000 Homeland Security employees.

Those working without pay – three days before Christmas – would include about 53,000 Transportation Security Administration workers, 54,000 customs and border protection agents and officers and 42,000 coast guard employees.

The statue of George Washington is seen beneath the Rotunda in the US Capitol (AP)

As many as 5,000 forest service firefighters and 3,600 National Weather Service employees would also continue working, with the expectation that they will be paid back in full once the government reopens.

Meanwhile, more than 380,000 employees will be furloughed – including nearly all of Nasa and Housing and Urban Development and 41,000 Commerce Department employees.

About 16,000 National Park Service employees – 80% of the agency’s workforce – would also be placed on temporary leave of absence, and many parks would close. Some parks are already closed for the winter.

Among those set to be furloughed: 52,000 staffers at the Internal Revenue Service, slowing analysis and collection of hundreds of thousands of tax returns and audits.

– Who works – and who doesn’t

The Capitol is seen at twilight in Washington (AP)

The rules for who works and who doesn’t date back to the early 1980s and have not been significantly modified since. The Trump administration is relying mostly on guidance left over from former president Barack Obama.

Under a precedent-setting memorandum by Reagan budget chief David Stockman, federal workers are exempted from furloughs if their jobs are national security-related or if they perform essential activities that “protect life and property”.

The air traffic control system, food inspection, Medicare, veterans’ health care and many other essential government programmes would run as usual. The Federal Emergency Management Agency could continue to respond to disasters.

On the other hand, the Washington Monument and many other attractions would close, as would museums along the National Mall.

In the past, the vast majority of national parks were closed to visitors and campers, but during the last government shutdown in January the interior department tried to make parks as accessible as possible despite bare-bones staffing levels. It is not clear if that effort will be repeated.

Ryan Zinke (AP)

Interior secretary Ryan Zinke, who greeted visitors at the Second World War memorial and other sites in Washington during the last shutdown, said he is stepping down at the end of the year.

– Federal workers still get paid – eventually

While they can be kept on the job, federal workers cannot be paid for days worked while there is a lapse in funding. In the past, however, they have been repaid retroactively even if they were ordered to stay at home.

Rush hour in Washington DC, meanwhile, becomes easier to negotiate, as tens of thousands of federal workers are off the roads.

– Shutdowns happen

House Democratic Leader Nancy Pelosi (AP)

US government shutdowns were not too big a deal in previous administrations. They happened every year when Jimmy Carter was president, averaging 11 days each. During Ronald Reagan’s two terms, there were six shutdowns, typically lasting just one or two days apiece. Deals were cut, and everyone moved on.

Before a three-day lapse in January, caused by Democrats’ insistence that any budget measure come with protections for young immigrants known as “dreamers”, the most recent significant shutdown was a 16-day partial closure of the government in 2013.

That event came as Tea Party conservatives tried to block implementation of Mr Obama’s flagship healthcare law. The US government also shut for a few hours last February amid a partisan dispute over deficit spending.

– Long-lasting political repercussions

US House speaker Paul Ryan (AP)

In a 1995-96 political battle, Democratic president Bill Clinton bested Speaker Newt Gingrich and his band of budget-slashing conservatives, who were determined to use a shutdown to force Mr Clinton to sign onto a balanced budget agreement.

Republicans were saddled with the blame, but most Americans suffered relatively minor inconveniences like closed parks and delays in processing passport applications. The fight bolstered Mr Clinton’s popularity and he sailed to re-election that November.

In 2013, the Tea Party Republicans forced the shutdown over the better judgment of GOP leaders like Speaker John Boehner. Republicans tried to fund the government piecemeal, but a broader effort faltered. Republicans eventually backed down and supported a round of budget talks led by Paul Ryan, who was then the House budget committee chairman.

Now, as House speaker himself, Mr Ryan is struggling to head off a shutdown just days before his long-announced retirement. Democrats, led by California representative Nancy Pelosi, will take over the House on January 3.