Fox News senior judicial analyst Andrew Napolitano said Monday that President Trump Donald John TrumpSteele Dossier sub-source was subject of FBI counterintelligence probe Pelosi slams Trump executive order on pre-existing conditions: It 'isn't worth the paper it's signed on' Trump 'no longer angry' at Romney because of Supreme Court stance MORE cannot legally follow through with his threat to shut down the U.S.-Mexico border.

“He cannot legally do it," Napolitano said on Fox News. "We know that because of federal statutes. They were last revised in 1986 when our relationship with migrants coming north was very different than it is now."

ADVERTISEMENT

“But that’s the law as he finds it and that’s the law as he is required to enforce it," Napolitano continued. "And that’s the law that the federal judge in San Francisco that the president attempted to disparage by calling an ‘Obama judge’ told him he had to enforce as well.”

Napolitano noted that Trump doesn't have to tolerate "lawlessness," but said that according to the law, migrants who have a "bonafide asylum claim, meaning you are escaping a government that is pursing you, or escaping a government that is failing to enforce basic law and order, can enter the U.S."

“The president doesn’t want to hear this but it’s the law,” he added.

Trump has escalated his rhetoric regarding immigration in response to a band of Central American migrants reaching the U.S.-Mexico border.

The president repeated his threat of shutting down the border entirely on Monday, tweeting that "Mexico should move the flag waving Migrants, many of whom are stone cold criminals, back to their countries."

"Do it by plane, do it by bus, do it anyway you want, but they are NOT coming into the U.S.A. We will close the Border permanently if need be. Congress, fund the WALL!"

The threat came just a day after tensions mounted along the southern border after Customs and Border Protection closed the port of entry near San Diego.

A group of hundreds of migrants stormed the border shortly after and tried to breach a border fence, leading U.S. agents to spray tear gas on a crowd of people.

Many of the migrants who reached the border over the weekend are fleeing violence and poverty in countries such as Honduras and Guatemala.

Trump has vowed to keep the migrants in Mexico as the U.S. processes their asylum claims. He's also signed a proclamation to prevent certain immigrants from claiming asylum.

The policy was blocked by U.S. District Judge Jon Tigar, an Obama appointee, last week.