President Donald Trump threatened on Sunday to shut down the federal government if the Democrats refuse to back his administration's proposed changes to immigration laws.

“I would be willing to ‘shut down’ government if the Democrats do not give us the votes for Border Security, which includes the Wall! Must get rid of Lottery, Catch & Release etc. and finally go to system of Immigration based on MERIT! We need great people coming into our Country!" Trump posted on Twitter.

The tweet came as part of a stream of posts relating to immigration.

Democrats, who want Open Borders and care little about Crime, are incompetent, but they have the Fake News Media almost totally on their side! — Donald J. Trump (@realDonaldTrump) July 27, 2018

Referring to the government's controversial former policy of separating families at the U.S.-Mexico border, he wrpte, "please understand, there are consequences when people cross our Border illegally, whether they have children or not — and many are just using children for their own sinister purposes."

"Congress must act on fixing the DUMBEST & WORST immigration laws anywhere in the world! Vote “R”" he added.

Trump has made similar threats in past months relating to immigration.

The government has shut down twice this year, but not at the behest of the president.

In January, the government entered a partial shutdown for three days when a key vote fell far short of the support needed to pass the senate. The proposal that failed would have funded the government until Feb. 16, extended the low-income Children's Health Insurance Program (CHIP) for six years and suspended some Obamacare taxes for two years.

But Senate Democrats, demanding progress on the fate of the young immigrants covered by the DACA program, withheld their support for the bill after the prospect of an agreement with Republicans and the White House fell apart.

The government temporarily closed again in February, after Congress failed to pass a funding bill due to the objections of one senator. Non-essential government services were closed throughout the night.

After weeks of negotiations between moderate and conservative Republicans in the House, lawmakers failed to pass the GOP’s compromise immigration measure last month. Members of Congress left Washington Thursday to go on a month-long recess without resolving the issue of immigration legislation and family separation at the U.S.-Mexico border.

Trump's tweet came days after the government said more than 1,800 children separated from their parents at the U.S.-Mexico border had been reunited with their families. Nonetheless, hundreds remain separated.