On Saturday, a woman we’ll call Maya fed her passport into the customs scanner at JFK airport. Maya is a legal permanent resident of the United States who’s in the process of applying for citizenship. She, her American husband, Sami, and their two American children had just returned from a family trip to Saudi Arabia, where Maya was born.

But in Saudi Arabia, citizenship is based on your father’s citizenship, not where you were born. Since Maya’s father was a Syrian citizen, she is, too — which means that even though she was born in Saudi Arabia, she’s subject to President Donald Trump’s executive order banning Syrians and people from six other majority-Muslim countries from entering the U.S. without special permission. In fact, she may have been subject to it even if she had never set foot in Syria. Trump’s order appears to be based on nationality, not country of origin.

So when Maya scanned her Syrian passport at JFK on Saturday, the machine spat out a paper with a black “X,” which indicated she needed to report to a Customs and Border Protection officer.

CBP officers questioned Maya about her past, about her marriage, and about the address she maintained when studying to be a pharmacist in Syria. They reviewed her social media accounts.

“I didn’t know if my wife was going to be with me,” Sami told The Huffington Post. “I didn’t know if my kids were going to have their mother.” HuffPost is withholding the family’s last name — and identifying Maya and Sami by pseudonyms — so as not to endanger Maya’s application for citizenship.

After three hours, CBP let Maya through. Maya and Sami credit an empathetic CBP officer who, they say, seemed unsure about how the order handed down Friday afternoon should be applied. He eventually asked his supervisors for permission to let Maya go.

But the short-term detention and questioning of a legal permanent resident who wasn’t even born in Syria offers an indication that the executive order Trump signed applies much more widely than he initially said.

The order is anything but precisely targeted. Its chaotic implementation Saturday left legal experts confused and Department of Homeland Security officials scrambling to explain who can now enter the country.

I didn’t know if my wife was going to be with me. I didn’t know if my kids were going to have their mother. Sami, a man whose wife was stopped for questioning due to Friday's executive order

The order Trump signed bars the “immigrant and nonimmigrant entry into the United States of aliens from” seven Muslim-majority countries — Iran, Iraq, Syria, Somalia, Yemen, Sudan and Libya. But that loose wording could encompass many people who don’t live in those countries — including people who weren’t even born there. In theory, it’s possible to be subject to the ban without ever having set foot in any one of the seven targeted countries.

The text of Trump’s order bans people “from” the seven countries from entering the U.S. But the word “from” can have multiple legal meanings, said Stephen Legomsky, the former chief counsel to U.S. Citizenship and Immigration Services. It could mean someone born in those countries, someone whose parents were born there, or someone who simply passed through, he said — although he noted the last interpretation is unlikely to gain traction.

“It’s terrible wording,” Legomsky told The Huffington Post. “There’s a big difference between being a national of a country and being born in the country.”

The vagueness leaves it up to individual officers of Customs and Border Protection to decide how they’ll interpret the order until the Department of Homeland Security sets a policy in writing, Legomsky said.

DHS did not respond to a request for clarification. But State Department officials told The Wall Street Journal that people who hold dual citizenship with any of the seven countries cannot enter the U.S., which indicates the Trump administration is hewing toward a strict interpretation that could affect people well beyond the seven countries’ borders. Legal permanent residents are also affected, though administration officials have said they will review decisions on a case-by-case basis. Trump advisers Stephen Miller and Steve Bannon pushed to apply the ban to legal residents over DHS officials’ objections, CNN reported Saturday.

White House Chief of Staff Reince Priebus offered a contradictory statement Sunday morning, saying in a televised interview that permanent residents wouldn’t be barred. Without written guidelines, his comments only added to the uncertainty, as several judges issued rulings blocking the order’s implementation.

Millions of people have left the seven countries targeted by the order over the last few decades. All seven have experienced war, civil conflict or political instability in the last 30 years, creating large-scale displacement. Other people have left for more mundane reasons that prompt people the world over to migrate — reuniting with family members who left before them, or searching for better economic opportunities.

That leaves open the possibility that those migrants and their children might face hurdles trying to enter the United States over the life of the ban, which lasts for 90 days for nationals of all seven countries. The order also suspends the U.S. refugee program for four months and bars refugees from Syria indefinitely.

Many migrants have made new homes in places that don’t automatically confer birthright citizenship. Saudi Arabia has particularly strict rules that extend citizenship mostly to the children of its country’s nationals. Although Maya and other children born to migrants may qualify as permanent residents, the Saudi government views most of them as foreign nationals who must look to their country of origin for passports.

Other countries that are home to large diasporas in both the Middle East and Europe have similar, if less exacting, restrictions on birthright citizenship.

Likewise, many governments do not require applicants to return to the country of their ancestry when soliciting citizenship documents. So the dual citizenship restriction also leaves open the possibility that children of migrants from the seven countries might be denied entry from the United States, despite never physically passing through those countries’ borders.

Putting the order into effect as the country went into a weekend only created chaos and confusion about who’s covered by it, said David Leopold, an immigration attorney who spent Saturday afternoon trying to help a Saudi-born Sudanese national who was turned away from JFK due to the order.

“They drop this order at 4:30 p.m. on a Friday,” Leopold told HuffPost. “Everyone’s leaving the office. Lawyers are gone. Reporters are leaving for the weekend. But planes are coming into the country. Nobody had any notice whatsoever. Nobody knew this was going to apply to permanent residents.”

Like Legomsky, Leopold said the preposition “from” in Friday’s executive order made it unclear who was excluded from the U.S. and who wasn’t. “It’s sloppy,” he said. “I don’t know what it means. ... But the object here is to keep Muslims out. They tricked permanent residents into being deported.”

That lack of legal analysis might have caused the confusion surrounding the scope of the order, said Ali Noorani, the executive director of the National Immigration Forum.

“This executive order is and can be expansive in ways that the administration is only now beginning to understand, much less the rest of us,” Noorani said. “It’s chaos.”

Sami is glad his family’s ordeal is over, but seething at the prospect that Maya’s parents can’t visit his family and they can’t go visit them. When he was in a bus from the terminal at his final destination, he overheard people saying that those upset about Trump’s order should move on and get jobs.

“I have a job, I’m a physician,” Sami said. “How am I supposed to move on? This man [Trump] is trying to take away my wife.”

Sign up for the HuffPost Must Reads newsletter. Each Sunday, we will bring you the best original reporting, long form writing and breaking news from The Huffington Post and around the web, plus behind-the-scenes looks at how it’s all made. Click here to sign up!