Protesters chant during a rally against the travel ban at San Diego International Airport on Monday, March 6, 2017. (Sandy Huffaker/AFP/Getty Images)

A Virginia federal judge ruled in favor of President Trump’s revised travel ban Friday, saying the president’s inflammatory comments about banning Muslims do not erase his broad national security powers.

The decision hands the administration a symbolic victory, but the attempt to forbid travel from several majority-Muslim countries remains blocked by two other federal courts.

Unlike judges in Hawaii and Maryland, Judge Anthony J. Trenga concluded that the newer executive order differs enough from its predecessor that it is likely to pass constitutional muster.

“This Court is no longer faced with a facially discriminatory order coupled with contemporaneous statements suggesting discriminatory intent,” he wrote.

The newer order is free of explicit religious discrimination, offers a national-security rationale for the six specific countries included and offers exceptions for individuals in the form of waivers, he noted.

Trump’s past statements, Trenga said, could not forever undermine the deference the president is legally owed in national-security matters. Nor, he argued, did more recent comments made by Trump and senior policy adviser Stephen Miller connecting the two orders.

“The Court cannot conclude for the purposes of the Motion that these statements, together with the President’s past statements, have effectively disqualified him from exercising his lawful presidential authority,” the judge wrote.

Sarah Isgur Flores, a Justice Department spokeswoman, said officials there were pleased with the decision.

“As the Court correctly explains, the President’s Executive Order falls well within his authority to safeguard the nation’s security,” Flores said in a statement.

On the other side of the argument, Gadeir Abbas, an attorney representing the Council on American-Islamic Relations, said the ruling was disappointing but had little practical significance. CAIR plans to appeal.

“It really doesn’t change much for us,” Abbas said. “While we disagree with the decision, it doesn’t affect any of the other injunctions that have been put in place, and it allows us now to take the next step, which is to get the full hearing before the Fourth Circuit.”

The Justice Department has already appealed the Maryland judge’s decision blocking the ban to the U.S. Circuit Court of Appeals for the 4th Circuit. The appeal of Trenga’s ruling will go to the same court, where the cases could be combined.

Stephen Vladeck, a professor at the University of Texas School of Law, said it was “not at all surprising” that courts have been divided on the newer travel ban.

“The second version of the executive order is certainly on stronger legal footing than the original,” he said. “The ball is very much now in the 4th Circuit’s court.”

Defending the ban in a court hearing on Tuesday, Chad Readler, acting assistant attorney general for the Justice Department’s civil division, concurred with Trenga that the “taint” of Trump’s comments on Muslims must at some point end.

“The president has power to deny entry to this country,” Readler said.

Abbas responded in court that both the order itself and the statements made around it were so discriminatory that national-security deference cannot apply.

“There’s no unringing of the bell; they can’t erase history,” he argued. “What the government has done is so unprecedented. We’ve never dealt with a president issuing an executive order restricting travel from certain countries on religious grounds. This order, because it’s so deviant, is not what it says it is.”

The White House’s own comments form a “single causal chain,” he argued, from a desire to ban all Muslims to the latest order. After the judge in Hawaii issued his preliminary injunction, Trump called the new travel ban a “watered-down” version of the first one. Miller said there were “mostly minor technical differences” between the two but the “same policy outcome.”

Abbas also contended that the national-security justification is flimsy and that it makes the order’s discriminatory purpose clear. A Department of Homeland Security report on the countries involved, Abbas noted, found that citizens from those countries are “rarely implicated in U.S.-based terrorism” and that citizenship itself is an “unreliable indicator of terrorist threat to the United States.”

Trenga concluded that such criticisms were not enough to overcome the president’s broad national-security powers.

“The issue is not whether [the executive order] is wise, necessary, under- or overinclusive, or even fair,” he wrote. “It is not whether [the order] could have been more usefully directed to populations living in particular geographical areas presenting even greater threats to national security or even whether it is politically motivated. Rather, the core substantive issue of law … is whether [the order] falls within the bounds of the President’s statutory authority.”

CAIR sued the president on behalf of activists who say that all Muslims are victims of an order designed to stigmatize Islam. The executive order violates the Constitution’s ban on religious discrimination, they believe, as well as a 1965 law barring discrimination in visa approval based on nationality.

The plaintiffs also include two students in the United States on visas, two citizens who hope to bring their wives to the country and several people who want family abroad to be able to visit. Readler argued that none of those plaintiffs had standing to challenge the ban because they are not suffering imminent, irreparable harm. Assuming the order takes effect, their relatives could apply for waivers, he said, which would be incorporated into the existing visa interview process.

Trenga did side with the plaintiffs on that issue, saying they have standing as American Muslims to challenge the ban.