As the coronavirus pandemic continues to deepen worldwide, President Donald Trump announced Wednesday that his administration would be “temporarily closing” the northern border of the United States with Canada to “non-essential traffic.”

The move comes as the administration is also weighing a similar closing of the southern border with Mexico, White House officials told the PBS NewsHour.

The president said in a Wednesday briefing at the White House that action on the southern border could come as early as today.

Trump made the announcement regarding Canada on Twitter, writing, “We will be, by mutual consent, temporarily closing our Northern Border with Canada to non-essential traffic. Trade will not be affected. Details to follow!”

We will be, by mutual consent, temporarily closing our Northern Border with Canada to non-essential traffic. Trade will not be affected. Details to follow! — Donald J. Trump (@realDonaldTrump) March 18, 2020

White House officials said the northern border closings — like the southern border plan being considered — will not apply to American citizens, green-card holders and foreigners who already have legal rights to be here, including people with work permits. A senior White House official said Trump administration officials have been in talks with Canada and Mexico about the changes and that the southern border announcement would likely be made as soon as possible.

The moves, which officials said will not apply to commercial traffic or goods, mean that U.S. Border Patrol agents will stop anyone without proper documentation from entering the U.S. and immediately return them to either Mexico or Canada without due process or any sort of court hearings. Those picked up by border agents would not be held for any length of time in an American facility.

The administration is gearing up for a legal fight over the border closings because they would be blocking migrants without detainment who present themselves either at legal ports of entry or who try to cross the southwestern border between the legal ports of entry. Immigration advocates say the move is a violation of existing immigration law. But White House officials told the NewsHour that the Trump administration’s legal argument in court would lean on the coronavirus outbreak, pointing to public health recommendations that people avoid large gatherings — including the close quarters in which immigrants are often processed and detained after they come across the border. Such close contact would put at risk the lives of border agents, workers in the facilities, as well as other U.S. residents and migrants, the administration plans to argue.

WATCH LIVE: Trump gives coronavirus update

Trump has focused throughout his presidency on stemming the flow of migrants trying to enter the U.S., especially through the southern border with Mexico. His policy of forcing migrants to remain in that country while seeking asylum in the U.S. is being challenged in court.

A number of immigration advocates are condemning the administration’s latest announcements.

“President Trump is engaging in fear-mongering to justify racist and discriminatory policies whose only purpose is to demonize people seeking safety,” Charanya Krishnaswami, advocacy Director for the Americas at Amnesty International USA, said in the statement. “The Trump administration cannot suddenly suspend U.S. obligations to people seeking safety. A blanket ban on asylum-seekers goes against the U.S. government’s domestic and international legal obligations, plain and simple.”