The US government has started to shut down after Congress failed to overcome a bitter standoff over spending and immigration, marking a choatic end to Donald Trump's first year as president.

Last-minute negotiations crumbled as Senate Democrats blocked a four-week stopgap extension in a late-night vote, causing the fourth government shutdown in a quarter of a century.

Social Security and most other safety net programmes are unaffected by the lapse in federal spending authority. Critical government functions will continue, with uniformed service members, health inspectors and law enforcement officers set to work without pay. But if no deal is brokered before Monday, two million federal employees will be furloughed – given leave of absence.

Most staff in the departments of housing, environment, education and commerce will stay at home. Half of workers in the treasury, health, defence and transportation departments will also not be going to work next week.

National parks and monuments face closure while visa and passport processing could be delayed.

Essential services that protect "life or human property" will continue, including national security, postal services, air traffic control, inpatient medical services, emergency outpatient medicine, disaster assistance, prisons, taxation and electricity generation.

Donald Trump's first year in office: the conflict and controversy