President Donald Trump's revised travel ban faces two major legal tests this month when federal appeals courts on opposite coasts take up challenges to an executive order that the administration says is urgently needed for national security and opponents say discriminates against Muslims.

The first hearing comes Monday in Richmond, Virginia.

Federal immigration law gives the president broad authority to bar foreign travelers from entering the United States. The Trump administration's new policy temporarily suspends the U.S. refugee program and blocks new visas to citizens of six majority Muslim countries.

Before the order could take effect in March, a judge in Maryland and one in Hawaii halted enforcement of critical sections, pointing to comments by Trump and top advisers indicating they wanted to bar Muslims from entry.

On Monday, a panel of more than a dozen judges on the U.S. Court of Appeals for the 4th Circuit will consider whether to leave in place the Maryland decision siding with challengers who say the order violates First Amendment prohibitions on government denigration of a particular religion.

Judges are likely to have questions about the administration's national security justification for singling out the six countries - Iran, Libya, Somalia, Sudan, Syria and Yemen - and about the relevance of Trump's statements before and after he took the oath of office.

In his March ruling, Maryland U.S. District Court Judge Theodore Chuang wrote that the "history of public statements continues to provide a convincing case that the purpose of the Second Executive Order remains the realization of the long-envisioned Muslim ban."

Justice Department lawyers want the Richmond-based appeals court to lift Chuang's injunction that applies only to the part of Trump's order that would temporarily block new visas for 90 days.

How quickly the 4th Circuit will rule is not known. But in an unusual step, the court bypassed the traditional three-judge panel to review the case as a full complement of as many as 14 judges. Judge J. Harvie Wilkinson, a Ronald Reagan nominee, will not participate Monday because his son-in-law, Jeffrey Wall, will argue the government's case as acting solicitor general.

To resurrect the administration's policy in full, the Justice Department would have to win in Richmond and in its upcoming appeal of the Hawaii ruling at the U.S. Court of Appeals for the 9th Circuit - or eventually persuade the Supreme Court to intervene.

A three-judge panel of the 9th Circuit has scheduled oral argument for May 15 in Seattle.

The revised travel order followed widespread confusion and protest in January after a first version caused deportations and detentions of people already aboard flights to the United States as the order was signed. The 9th Circuit in February upheld a court order that suspended the original travel ban, leading to the president's revamped version.

The new order dropped Iraq from the list of excluded countries and did not touch green-card holders and valid visa holders, as the first order had.

In Richmond, government attorneys will ask the court to limit its review to the language of the order. The ban does not mention religion, and the administration says it is designed to give officials time to assess existing screening procedures for entries from countries that Congress and the Obama administration previously identified as areas of "concern."

The Justice Department said in court filings that the lower court's reliance on campaign statements made by then-candidate Trump is "unprecedented": "The court should have focused on official acts, not perceived subjective motivations."

Top law enforcement officials from 13 states, including Texas, Arizona and Florida, backed the administration in court filings, urging the 4th Circuit not to interfere with "an area of strongest executive authority" and arguing that foreign citizens do not have a constitutional right to enter the United States.

The challenge in Maryland was brought by organizations and individuals, including Muslim U.S. citizens and Muslim green-card holders who are trying to reunite with relatives who would be affected by the ban. They are being represented by the National Immigration Law Center and the American Civil Liberties Union.

Allowing the policy to go forward harms the individual plaintiffs by "prolonging their separation from their loved ones, most of whom remain in dangerous conditions abroad," according to their attorneys, led by ACLU lawyer Omar Jadwat.

Opponents argue that the president's travel order specifically violates the establishment clause of the First Amendment that forbids the government from favoring or condemning a particular religion.

"The anti-Muslim message embodied by the order singles them out for particular condemnation and stigma because they are Muslim immigrants," the ACLU filing said.

Diverse organizations representing technology companies in Massachusetts, art museum directors, religious leaders and labor unions filed briefs opposing the administration's policy.

More than 40 former national security, foreign policy and intelligence officials, including former secretaries of state Madeleine Albright and John Kerry, also signed on to a brief saying the blanket ban is misguided and would undermine U.S. security by adding to the narrative that the United States is at war with Islam. The order will "impair relationships with the very Muslim communities that law enforcement professionals rely on to address the threat of terrorism."

National security is not at risk, the former officials said, because travelers are already subjected to vigorous vetting before visas are issued.

A coalition of about 50 constitutional law professors joined a separate brief insisting the president's remarks must be considered. Even if the court defers to the president when it comes to immigration and national security, the professors said, "it is hard to imagine a clearer case of governmental action motived by animus toward a single religion."

Attorneys opposed to the ban drew parallels to the 1944 Supreme Court case Korematsu v. United States and urged caution. In that case, the court deferred to the executive's national security concerns to uphold the internment of Japanese Americans during World War II.

University of Texas law professor Stephen Vladeck, who signed onto a brief challenging the first iteration of the ban, said Korematsu's lesson is that "even - if not especially - when the government claims a discriminatory policy is justified by amorphous national security concerns, courts should treat such claims with great skepticism."