A judge has temporarily blocked President Donald Trump's travel ban on people from seven predominantly Muslim countries.
He acted after Washington state and Minnesota urged a nationwide hold on the executive order that has launched legal battles across the country.
US District Judge James Robart in Seattle ruled against government lawyers' claims that the states did not have the standing to challenge Mr Trump's order and said they showed their case was likely to succeed.
"The state has met its burden in demonstrating immediate and irreparable injury," the judge said.
Mr Trump's order last week sparked protests nationwide and confusion at airports as some travellers were detained. The White House has argued that it will make the country safer.
Washington became the first state to sue, with Attorney General Bob Ferguson saying the order was causing significant harm to residents and effectively mandates discrimination. Minnesota joined the suit this week.
The two states won a temporary restraining order while the court considers the lawsuit, which says key sections of Mr Trump's order are illegal and unconstitutional.
Court challenges have been filed nationwide from states and advocacy groups, with some other hearings also held Friday.
"Washington has a profound interest in protecting its residents from the harms caused by the irrational discrimination embodied in the order," Mr Ferguson said.
Federal lawyers had argued that Congress gave the president authority to make decisions on national security and admitting immigrants.
The lawsuit says Mr Trump campaigned on a promise to ban Muslims from coming to the US and kept up that rhetoric while defending the travel ban.
Lawyers pointed to dozens of exhibits of speeches and statements that Mr Trump has made.
"The executive order effectively mandates that the states engage in discrimination based on national origin and/or religion, thereby rescinding the states' historic protection of civil rights and religious freedom," the complaint said.
It called it a violation of the US constitution.
The lawsuit ultimately seeks to permanently block parts of the executive order that suspend immigration from the seven Muslim-majority countries, put the US refugee admissions programme on hold and halt entry of Syrian refugees.
Mr Ferguson said the order is causing significant harm to Washington residents, businesses and its education system.
It will reduce tax revenue and impose significant costs on state agencies, as well as make it impossible for some state employees and students to travel, he said.
Washington-based businesses Amazon, Expedia and Microsoft support the state's efforts to stop the order. They say it is hurting their operations, too.