With his revised temporary travel ban, President Donald Trump sought to resolve legal questions that caused a federal judge to halt the first version of the executive order.

Legal experts say the Trump administration succeeded in strengthening the legal case for the new order by applying travel restrictions to fewer people—exempting entire classes of individuals, including legal permanent residents—and providing a more detailed rationale for the policy.

However, Trump’s order, issued last Monday, remains vulnerable to challengers who argue the travel ban is an extension of a “Muslim ban” that the president promised during the campaign, and a violation of the First Amendment’s protection against religious discrimination.

“If this exact order had been issued by a different president without the context with which the order was issued, it’s a 100 percent certainty the order would be upheld in a court,” said Leon Fresco, the former head of the Department of Justice’s Office of Immigration Litigation, in an interview with The Daily Signal.

>>>Trump Signs Revised Travel Ban Targeting ‘Foreign Terrorist Entry’

The new executive order bars entry to foreigners for 90 days from six terrorism-plagued, Muslim-majority countries who have never before entered America. It also suspends for 120 days resettlement to the U.S. of refugees from anywhere in the world. Syrian refugees are no longer subject to an indefinite ban, as they were in Trump’s first order.

The 90-day travel restriction applies to Iran, Syria, Somalia, Sudan, Yemen, and Libya, countries contained in Trump’s original order that the Obama administration and Congress had designated as posing risks of terrorism. Trump removed Iraq—a crucial counterterrorism partner—from that list in the new order.

Hawaii was the first state to sue over the new order, and a hearing in that case is scheduled for Wednesday. A federal judge in Maryland will also hear arguments on that day in a separate lawsuit over the ban.

Meanwhile, some of the states that helped block Trump’s original travel ban are already mounting challenges to the second one. Backed by several fellow Democratic attorneys general, Bob Ferguson of Washington asked the same federal district judge who issued a temporary restraining order on the original ban, James Robart, to extend that freeze and apply it to the updated restrictions.

With the new order set to take effect Thursday unless a court intervenes, The Daily Signal explores some of the legal questions surrounding the case.

Who Can Sue?

The new order sharply limits the types of people subject to the temporary travel ban.

Unlike the first order, the new one explicitly excludes lawful permanent residents of the U.S.

Others exempted from the travel restrictions include dual nationals of the six targeted countries who use a passport from another country not on the list, foreigners traveling for diplomatic purposes, and individuals who have already been granted asylum or refu­gee status.

In addition, the order contains a list of people who can be granted exemptions to the restrictions on a case-to-case basis, including when a “foreign national seeks to enter the United States to visit or reside with a close family member,” and instances where a foreigner previously admitted to the U.S.—such as college students or faculty—leaves the country and seeks to return.

“Who is left over?” writes Josh Blackman, a professor at the South Texas College of Law in Houston, in a recent blog post. “Aliens from these six nations who have never entered the United States, have no relatives in the United States, and have never received any travel document from the United States. The category of aliens who are actually excluded, and who would actually seek to visit the United States is likely small. No court has ever held that aliens that are seeking entry, who have zero connection to the United States, or its residents, have due process rights.”

Experts say because fewer people are affected by the new travel ban, it will be more difficult for challengers to the policy to find plaintiffs who have legal standing to sue.

“The best argument against the order is gone—that you are taking away people’s rights who had previously been admitted into the country without consideration of due process,” Fresco said. “That is gone now. Now you have the question of whether new people with no ties to the U.S. are permitted to enter here, and that has always been more tenuous legal ground to be on.”

Blackman speculates that those who assert a compelling interest to travel to the U.S. could try to sue. On his blog, he lists two such examples as a student in Syria who seeks to pursue a degree at the University of Washington, or an Iranian engineer who wants to work at Microsoft.

In a case out of Wisconsin, a man who fled Syria and was granted asylum in the U.S. sued so that the ban would not be applied to his wife and 3-year-old daughter, who are still in war-torn Aleppo and have asylum applications being processed. This past weekend, a federal judge in Wisconsin blocked enforcement of the policy against the Syrian man’s family.

“The court appreciates that there may be important differences between the original executive order, and the revised executive order—for example, the government points to a new waiver provision,” Judge William M. Conley wrote. “As the order applies to the plaintiff here, however, the court finds his claims have at least some chance of prevailing for the reasons articulated by other courts.”

Questions of Intent

Washington and Hawaii are claiming the new order, like the original version, is equivalent to a Muslim ban that Trump proposed in the campaign.

Opponents also point to statements by Trump’s advisers, including former New York Mayor Rudy Giuliani, who said Trump asked him how to implement a Muslim ban legally, and more recently, Stephen Miller, a senior White House adviser who said the revised order was meant to have “the same basic policy outcome” as the first.

The Trump administration rejects charges of religious intent, noting that most Muslim-majority countries were not included in the order. The new order contains no reference to religion, and removes a clause from the original version that would have granted preference to foreign travelers who belong to minority religious groups.

“Is it really possible that if the government says something once, it is prohibited in doing any policy moving forward on this subject?” Fresco said. “No one has won a case like that.”

However, Fresco and Blackman concede this argument is a powerful one, and they could envision at least one court that views Trump’s and his team’s previous comments as relevant to the new order, and tantamount to discriminating against Muslims.

“If a court believes this policy will forever be infected by the previous comments then there is absolutely nothing the government can do to ever eliminate that,” Blackman told The Daily Signal in an interview. “Then we are just wasting our time here and they will strike it down.”

Judging the Order’s Content

Legal experts say in the face of questions over religious intent, courts are more likely to view the order favorably if the government can prove why the policy is necessary.

The courts usually defer to the executive branch on issues of national security and immigration policy. Federal immigration law states that if the president finds “the entry of any aliens” would be “detrimental” to the country’s interests, he can impose restrictions.

But courts could impose stricter scrutiny over Trump’s order, considering the context under which he issued it.

“The question is, does the content of the order do enough to dispel a presumption that religious discrimination is the motive, or does it do things to confirm it?” said Richard Primus, a constitutional law professor at the University of Michigan, in an interview with The Daily Signal.

“The normal way a court answers that question is in part by asking is the content of the government action well tailored to the problem the government says it is trying to solve,” Primus added. “The less tailored it is, the more the decision-maker expects that the problem the defendant says they are trying to solve isn’t really what they are trying to solve.”

>>>Experts Differ on Whether Trump’s New Travel Ban Makes America Safer

The Trump administration has argued the travel ban is necessary for national security reasons, and that the targeted countries are dangerous hotbeds of terrorism.

In making the case for the policy, the revised order contains a clause noting about 300 pending FBI counterterror investigations involve individuals who came to the U.S. as refugees, although it doesn’t specify how many came from the targeted countries.

Critics of Trump’s order counter that none of the recent terrorist attacks in the U.S.—from San Bernardino to Orlando—were perpetrated by anyone from the nations listed in the travel ban.

“The new executive order is certainly much more robust in explaining why the president thought he is justified in temporarily stopping immigration from those six countries,” said Stephen Yale-Loehr, an immigration law professor at Cornell Law School, in an interview with The Daily Signal.

“He can be criticized for why he picked those six countries, and not others, but the standard of review in most immigration cases is very low, sometimes even below a rational basis test,” Yale-Loehr added. “As long as the president has a bonafide, legitimate reason for whatever he does, the courts often say that’s good enough. In some cases, courts also have been deferential to presidents even when First Amendment issues have been raised.”

Blackman says the administration in its new order changes how it argues for the policy in a way that may make it tougher for courts to reject.

“The old order said we need a temporary pause because aliens from these countries will come to the U.S. and engage in acts of terror, when very few have actually done this,” Blackman said. “The new order makes a different point, which is we don’t have good diplomatic relations with these countries, and these countries are not providing accurate information of its citizens for the U.S. to bet on. That’s a very different point and a lot harder for the court to ignore.”