New York: Donald Trump has threatened to shut down the US government if Democrats refuse to back his demands to fund a border wall with Mexico.

Trump has endured a series of setbacks in his efforts to tighten the US immigration system and deliver on his election pledge to build a wall along the southern border.

In a Sunday morning tweet, he raised the stakes by tying the issue to funding the whole of government, which must be agreed by September 30, risking a political showdown just before November's crucial mid-term elections.

"I would be willing to 'shut down' government if the Democrats do not give us the votes for Border Security, which includes the Wall!" he wrote. "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!"