A federal immigration judge granted asylum to a California woman who was orphaned in Iran in the 1970s and adopted by an American war veteran, the Associated Press reported. Judge Andrew Fishkin’s ruling likely ends a monthslong ordeal for the woman, whom immigration officials had threatened earlier this year with deportation to Iran — a country with which the United States is now at war.

The woman has lived in the United States since she was adopted by American parents as a toddler and has no criminal record, AP reported. The Associated Press is not naming her because she worries her legal situation remains tenuous as the administration has time to appeal, the wire service said. A federal judge has allowed her to use the pseudonym “Ms. S” in her challenge to the government’s determination of her immigration status.

The case is among thousands of international adoptees who were never granted U.S. citizenship because of bureaucratic loopholes between adoption and immigration law, according to AP. Because they were adopted abroad, many were not automatically naturalized and remained lawful permanent residents, leaving them vulnerable to deportation if they later fell afoul of immigration rules or if conditions in their country of origin changed.

The ruling by Fishkin, who serves in the immigration court system, likely ends the direct threat of removal for Ms. S, though the government may appeal. The decision comes amid a broader tightening of immigration enforcement under the current administration, which has taken a hard line on Iranian nationals amid the conflict.