Immigration attorney Farah Al-khersan knows firsthand what it's like to be stopped at a border and forced to prove that you belong in America — it happened to her last year when the first version of President Donald Trump's travel ban was unveiled.

So when the Supreme Court upheld the latest version of the ban Tuesday, Al-khersan knew what to say when the phones started ringing at the Detroit-area law firm where she works.

In essence, her advice was this: If you have a green card, or if you’re here on a nonimmigrant visa, don’t even think about leaving the U.S. right now.

“If you try to come back, and you’re from one of the restricted countries, you might have problems,” she said.

Al-khersan, who emigrated from Iraq with her family in 1991, said she learned her lesson in February 2017 when she and her Iraqi-born husband tried to return to their Michigan home after visiting family in Canada.

“A lot of people are very nervous and very scared,” said Al-khersan, whose clients come from a large Arab-American community that settled in and around Motown. “We try to give them as much information as we can, but we don’t know how this is going to play out.”

“It feels like we’ve taken a lot of steps backward today,” she said.

That feeling was widespread as Muslim Americans across the country digested the latest shocking development.

In Chicago, Lina Sergie Attar of the Karam Foundation, a nonprofit organization that helps Syrians, said the Syrian refugees the group has been resettling are terrified.

“We have to explain to them that we’re living in a time when the government that’s ruling America right now is not a very welcoming government,” she said. “It’s very painful for me as an American to have to explain this. I am the daughter of Syrian immigrants.”

Attar said the travel ban won’t affect the group's workload. “Only 11 Syrian refugees have been accepted in the U.S. this year,” she said.

But it dashed the hopes of Syrians already in America of one day reuniting with family members still trapped in Syria or struggling to survive in refugee camps in Turkey and elsewhere. And it leaves dozens of Syrian students who have already been accepted at U.S. universities in limbo.

“We’re shutting down borders, separating kids from their parents, it’s very un-American what’s going on,” she said.

Many of the bodegas in New York City are owned and operated by Yemeni immigrants. And their homeland is one of the restricted countries.

After the Trump administration unveiled the travel ban in February 2017, the Yemeni American Merchants Association staged a citywide bodega strike.

“I have been consoling people, telling people this is not the end, assuring them they will be reunited with their families, “ said community activist Debbie Almontaser, who is of Yemeni extraction. “Literally everybody in our community has been touched by this. “

Almontaser said other ethnic groups, like the Chinese and Japanese, went through similar ordeals.

“This is no different from those dark times in history,” she said. “I tell them to stay strong and to remember that they live in a nation that was created for the people and by the people.”

For many years, Mike Kalil was the only Syrian living in Rutland, Vermont. Now three Syrian refugee families call the city home — over the objections of residents who revolted when the mayor tried to resettle 100 Syrian refugees in Rutland.

Kalil was in Turkey visiting kin when the ruling was announced.

“Relatively speaking, we're doing real good,” he said in an email to NBC News. “I still have family members in Aleppo that are trapped.”

In advance of the Supreme Court ruling, Dr. Ahmad Bailony, a San Diego-area pediatrician and the son of Syrian immigrants, wrote two opinion pieces.

“One of them was about the Supreme Court knocking it down,” Bailony told NBC News. “Unfortunately that one didn’t get published.”

Instead, Bailony’s anger and anguish over a decision that could leave much of his extended family stranded in Aleppo was published by USA Today.

“My Syrian aunts, uncles and cousins will be indefinitely banned from finding safety with our family in the United States,” Bailony wrote. “By upholding the ban, our country has effectively turned its back on the opportunity to not only stand up for religious freedom and equality, but also to save human lives by helping people like my family members find refuge.”

Bailony’s pain is being felt by the entire Muslim American community, said Sufyan Sohel, who heads the Chicago office of the Council on American-Islamic Relations.

“This is a miscarriage of justice," said Sohel. “The Supreme Court had an opportunity to remind this country that all of us, regardless of where we were born, what we look like, or how we pray, are welcome, and they failed. This ban was inspired by — and remains — contrary to the values of freedom and equality that are central to who we aspire to be as a nation.”

The travel ban that was upheld by the Supreme Court came after several earlier tries by the Trump administration failed to pass muster with the lower federal courts.

The latest version maintains limits on granting visas to travelers from five of the seven countries covered by the original executive order on travel — Iran, Libya, Somalia, Syria and Yemen. It lifts restrictions on visitors from Sudan, and it adds new limits on North Korea and Venezuela.

Chad was part of the proclamation but was taken off the list in April after the White House said it met enhanced visa security requirements. Iraq was listed in the original travel ban imposed last year but was removed in the second version.