Media playback is unsupported on your device Media caption Republican Leader Senator Mitch McConnell accused the Democrats of "irresponsible political games"

The US government has begun shutting down many of its services after the Senate failed to agree on a new budget.

A bill to fund the federal government until 16 February did not receive the required 60 votes amid a bitter dispute over immigration and border security.

It is the first shutdown ever to happen while the same party, the Republicans, controls Congress and the White House.

The impasse will affect hundreds of thousands of federal workers, and the recriminations have already begun.

President Donald Trump accused Democrats of putting politics above the interests of the American people.

Skip Twitter post by @realDonaldTrump Democrats are far more concerned with Illegal Immigrants than they are with our great Military or Safety at our dangerous Southern Border. They could have easily made a deal but decided to play Shutdown politics instead. #WeNeedMoreRepublicansIn18 in order to power through mess! — Donald J. Trump (@realDonaldTrump) January 20, 2018 Report

But the leading Senate Democrat, Chuck Schumer, blamed the president, saying Mr Trump had turned down two bipartisan compromise deals and "did not press his party in Congress".

The last government shutdown was in 2013, and lasted for 16 days.

What is a government shutdown?

As of 00:01 Saturday (05:01 GMT), many federal agencies are no longer open for business - although essential services will continue to run.

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 on Monday.

Media playback is unsupported on your device Media caption Government workers on what happens during a shutdown

National parks and monuments could face closure, which provoked an angry public reaction during the 2013 shutdown.

Visa and passport processing could also be delayed.

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

This could be a protracted, ugly fight

Anthony Zurcher, BBC News, Washington

The game of chicken ended with a head-on crash.

Republicans are anxious to label this the "Schumer shutdown" and, essentially, they're right. Chuck Schumer and his fellow Democrats (with the help of a few Republicans) blocked a bill that would have kept the government open - at least temporarily.

Determining responsibility and apportioning blame, however, are two decidedly different endeavours.

Democrats will argue that they had a deal with the president on their bipartisan compromise that included immigration reform - only to have him back away during that fateful obscenity-laden Oval Office meeting last week. Republicans will frame this as liberals putting undocumented immigrant protections over military readiness and health insurance for poor kids.

The blame game began at midnight, and the winner has yet to be decided. Generally, the loser in these types of showdowns is the party entering the fight with the lowest popularity - bad news for Mr Trump and the Republicans.

The good news, for both sides, is that their political bases will be thrilled they are playing hardball. Midterm election years, like 2018, tend to encourage this kind of rally-the-base manoeuvres.

Now that the line has been crossed, this could become a protracted, ugly fight.

Why can the two sides not agree?

The main bone of contention has been Democrats' demands for more than 700,000 undocumented immigrants who entered the US as children to be protected from deportation.

These "Dreamers", as they are known, were granted temporary legal status under a programme established by former President Barack Obama.

In September, Mr Trump announced he was ending the programme and allowing Congress until March to come up with a replacement.

Media playback is unsupported on your device Media caption The missing - consequences of Trump's immigration crackdown

The Republican president and congressional conservatives have been using the issue as a bargaining chip in an attempt to wring concessions from Democrats.

Mr Trump wants funding for tough new border controls, including his proposed US-Mexico wall.

Republicans added a sweetener to the bill in the form of a six-year extension to a health insurance programme for children in lower-income families.

But Democrats want this programme extended permanently.

Media playback is unsupported on your device Media caption "America is the only country I've known" says this Dreamer

The legislative negotiations went up in flames last week after Mr Trump allegedly complained the US was letting in immigrants from certain "shithole countries".

What happens now?

Despite blaming each other, both the Republican and Democratic leaders said they would continue to talk over the weekend.

Mick Mulvaney, the head of the Office of Management and Budget (OMB), said there was a "really good chance" it could be resolved before government offices open again on Monday.

But the White House took a tough line after the midnight deadline passed, tweeting that it would "not negotiate the status of unlawful immigrants while Democrats hold our lawful citizens hostage over their reckless demands".

However, with mid-term elections looming in November, neither party wishes to be held accountable for closing the government.

The shutdown began on the first anniversary of President Trump's inauguration. He has delayed a trip to his Florida resort where he is due to host a party - with attendees paying as much as $250,000 (£180,000; €204,500) - to mark the event.

What happened during the 2013 shutdown?

Many federal employees were forced to take a leave of absence - officially known as being furloughed - during the 16 days of shutdown.

At its peak, some 850,000 employees were off work each day. It cost the government $2bn in lost productivity and led to "significant negative effects on the economy", the OMB said at the time.

Donald Trump, interviewed by Fox and Friends at the time, laid the blame for the shutdown with the then president, Barack Obama.

"The problems start from the top and have to get solved from the top," he said. "The president is the leader, and he's got to get everybody in a room and he's got to lead."

10 unexpected consequences of the 2013 shutdown

Image copyright Getty Images Image caption National parks and monuments are facing closure

More on Trump's first year