The case, Washington v. Trump, is the most prominent lawsuit challenging Trump’s immigration and refugee order. Among other provisions, the order temporarily suspended the U.S. Refugee Admissions Program for 120 days, barred Syrian refugees from admission until further notice, and suspended immigrant and non-immigrant visa travel from seven Muslim-majority countries for 90 days. The visa suspensions went into effect immediately, causing chaos at major U.S. airports as some travelers found themselves unable to enter the country while in transit.

The Trump administration defended its order on national-security grounds, saying it was necessary while it conducts a comprehensive review of the nation’s security procedures at the border. But that argument won little sympathy among the three judges, who noted the lack of proof offered by Justice Department lawyers during oral arguments on Wednesday.

“The Government has pointed to no evidence that any alien from any of the countries named in the Order has perpetrated a terrorist attack in the United States,” the panel wrote. “Rather than present evidence to explain the need for the Executive Order, the Government has taken the position that we must not review its decision at all.”

“We disagree,” they added.

Bringing the lawsuit were the Democratic attorneys-general of Washington state and Minnesota. In their brief, the two officials claimed the executive order would hurt both states’ economies and tax bases by disrupting the ability of their noncitizen immigrants to travel. They also argued the order violated the First Amendment’s religious-freedom protections and the Fourteenth Amendment’s equal-protection guarantee by targeting Muslims.

While the judges did not rule on the merits of those arguments, they did hand the states a crucial procedural victory by ruling they had standing to bring the lawsuit against the federal government. To have standing in a lawsuit, the litigants—in this case, the states—must prove they have a direct stake in its outcome. The panel pointed to the order’s impact on both states’ higher-education systems, ruling that the disruptions for foreign-born students and faculty justified the intervention.

“This is a complete victory for the state of Washington,” Washington Attorney General Bob Ferguson said during a press conference. “We are a nation of laws, and as we have said from day one, those laws apply to everyone in the country. That includes the president of the United States.”

Justice Department lawyers strongly defended the order as a proper use of the president’s broad authority on immigration. The Trump administration frequently pointed to a section of the U.S. Code that authorizes the president to “suspend the entry of all aliens or any class of aliens as immigrants or nonimmigrants” if he deems their entry “detrimental to the interests of the United States.” The administration also cited the traditionally wide latitude given by the courts to the president and Congress to craft and enforce the nation’s immigration laws. But the judges declined to exercise that discretion, citing past judicial interventions into national-security matters.