President Donald Trump talks about immigration and border security from the Roosevelt Room of the White House in Washington, Thursday, Nov. 1, 2018. (AP Photo/Susan Walsh)
San Francisco CNN  — 

The Trump administration’s new effort to block some immigrants from seeking asylum in the United States faced its first test in court on Monday.

US District Judge Jon Tigar is weighing a request from immigrant rights groups to immediately block implementation of the administration’s recent asylum rule while the legal battle plays out in court. Tigar heard arguments from both sides in a federal court in San Francisco on Monday, but did not issue a decision.

The administration’s rule, issued earlier this month, bans most asylum claims from immigrants who crossed the US-Mexico border illegally.

Advocates argue it’s illegal to block someone from seeking asylum based on how they entered the country, and that the administration also violated the Administrative Procedure Act by not providing public notice or comment on the rule.

Lee Gelernt, deputy director of ACLU’s Immigrant Rights Project and the advocacy groups’ lead attorney in the case, urged the judge to block the asylum restrictions. He argued that leaving them in place poses serious risks for vulnerable migrants who are seeking safety.

“Everyday people are in danger,” Gelernt said.

Scott Stewart, an attorney representing the Justice Department, said the measure discourages people from crossing the border illegally. The administration, he said, is “recognizing the importance of principles” by effectively closing the border between ports of entry.

The new asylum restrictions are the latest move by the Trump administration to crack down on what it says is fraud in the immigration system, and it follows the deployment of thousands of troops to the southern border to face what officials argue is a crisis.

The move was in part sparked by large groups of migrants heading through Mexico toward the US border, but the legal outline for the measure had been in the works for some time.

Advocates argue the administration is attempting to create a crisis at the border to score political points.

“We don’t believe there’s actually been an emergency,” Gelernt said.

The Department of Justice and the Department of Homeland Security argue that the President has the right to suspend entry by individuals into the United States if he determines it to be in the national interest.

It’s unclear exactly how a temporary restraining order would affect the current situation at the border. Large groups of Central American migrants have started to arrive in border cities in recent days and say they plan to seek asylum in the United States.

CNN’s Dan Simon reported from San Francisco. CNN’s Catherine E. Shoichet and Geneva Sands reported from Washington.