President Trump said that the rest of the world is “laughing at the stupidity of our immigration laws,” a reprimand that came after threatening a government shutdown in September if Congress doesn’t include substantial border security funding in an upcoming spending package.

“Illegal immigration is a top National Security problem. After decades of playing games, with the whole World laughing at the stupidity of our immigration laws, and with Democrats thinking......that Open Borders, large scale Crime, and abolishing ICE is good for them, we must get smart and finally do what must be done for the Safety and Security of our Country!” Trump wrote in a series of tweets Monday evening.

[Trump: Democrats want illegal immigrants 'to pour into and infest' the US]

Illegal immigration is a top National Security problem. After decades of playing games, with the whole World laughing at the stupidity of our immigration laws, and with Democrats thinking... — Donald J. Trump (@realDonaldTrump) July 30, 2018

...that Open Borders, large scale Crime, and abolishing ICE is good for them, we must get smart and finally do what must be done for the Safety and Security of our Country! — Donald J. Trump (@realDonaldTrump) July 30, 2018

Trump echoed similar sentiments earlier in the day after he met with Italian Prime Minister Giuseppe Conte.

"As far as the border is concerned, and personally, if we don’t get border security, after many, many years of talk within the United States, I would have no problem doing a shutdown. It’s time we had proper border security. We’re the laughing stock ... we have the worst immigration laws anywhere in the world," he said.

Trump said there was some “room” for debate concerning the funding, but stressed that additional border security resources were critical.

"We need border security. Border security includes the wall, but it includes many other things. We have to end the [visa] lottery, we have to end the chain. We have to end these horrible catch-and-release principles," he added. "So I would certainly be willing to close it down to get it done."

A shutdown was avoided in March after Congress approved a $1.3 trillion spending package that would fund the government through the end of September. However, the spending measure did not address immigration and Trump said at the time, "I will never sign another bill like this again."

The Trump administration’s "zero tolerance" policy to prosecute all illegal immigrants has attracted significant backlash this summer. The policy resulted in thousands of children being separated from their accompanying adults after being apprehended at the border.

In response, Trump signed an executive order last month to prevent the splitting up of apprehended immigrant families and announced Thursday that all eligible children who had been separated from their migrant families had been reunited in response to a federal judge's ruling.