A federal judge in Los Angeles has ruled President Donald Trump’s administration must allow immigrants with initial clearance for legal residency to enter the United States from seven Muslim-majority nations, despite an executive order ban.

Tuesday’s ruling by US District Judge Andre Birotte Jr follows decisions by federal judges in at least four other states that also limited the executive order Trump issued on Friday.

But it goes further, by focusing on a large group of people from the seven nations of Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen – the countries targeted in the executive order – who are outside the United States and trying to enter.

In the temporary ruling, Birotte ordered US officials to refrain from “removing, detaining or blocking the entry of plaintiffs or any other person … with a valid immigrant visa” who is arriving from one of the seven nations.

According to the US Department of State, immigrant visas are the first step to becoming a lawful permanent resident, or a green card holder.

Birotte’s ruling does not apply to tourists, students or business travelers with non-immigrant visas.

The US Department of Justice is reviewing the order and would have no further comment, a spokeswoman for the agency said in an email.

A spokeswoman for the Department of Homeland Security cited its policy of not commenting on pending litigation.

Trump’s executive order has not only caused consternation for the nations involved but among other Muslim-majority countries, allies such as Germany and Britain and career State Department officials.

Attorney Julie Ann Goldberg, who brought the case on behalf of more than two dozen plaintiffs of Yemeni descent, including US citizens, said they sought the ruling after learning of a move by the US State Department to cancel the immigrant visas of people from the seven countries.

More than 200 people with immigrant visas who left Yemen and are related to US citizens or legal residents are stranded in Djibouti across the Bab el-Mandeb Strait from Yemen and were barred from flying to the United States, Goldberg said by telephone from Djibouti.

“It’s terrible because I have children here who are without their parents,” she said.

Some other children in the group are US citizens whose parents were traveling with immigrant visas, she added.

In Boston, US District Judge Allison Burroughs on Sunday issued a ruling, to last seven days, that barred the detention and removal of approved refugees, visa holders and permanent US residents who entered from the seven countries.

By early Thursday in Djibouti, Goldberg said, no one from the group she represented was being allowed to leave for the United States. She accused the Trump administration of “absolutely ignoring” rulings she believes should allow their departure.

In an email, a State Department official confirmed the agency had provisionally revoked “relevant visas as defined” under Trump’s executive order.

The White House said on Wednesday it has issued updated guidance on the order clarifying that green card holders require no waiver to enter the United States.