Follow CBSMIAMI.COM: Facebook | Twitter

FORT LAUDERDALE (CBSMiami) — A green card-holding Iranian chemical engineer who lives in San Francisco has been released by U.S. Customs officials at Port Everglades.

READ MORE: Gov. Ron DeSantis Signs Bill Targeting Fentanyl, Meth Dealers

Maysam Sodagari, undated photo (Source: Facebook)

Maysam Sodagari, undated photo (Source: Facebook)

Maysam Sodagari was detained for several hours upon his return from a cruise Sunday. It comes after President Trump’s executive order putting a 90-day hold on entry into the United States for citizens of seven predominantly Muslim countries, including Iran.

Sodagari, while out at sea on an annual gay cruise, posted on Facebook Saturday afternoon his concern about what possibly faced him when the cruise returned to port the following morning.

The posts went viral as his future was suddenly in jeopardy.

Sodagari, according to his LinkedIn page, has a green card and has worked in the U.S. since graduating from the University of Akron with a Ph.D. He was traveling on Royal Caribbean’s Allure of the Seas, which had stops in Mexico and Haiti.

He shared his ordeal as it played out, posting “Just got stopped on the ship exit, as others were allowed to leave….” and “I m being escorted to the cbp”

Sodagari posted a few videos of himself waiting at the baggage terminal. Dozens of friends and strangers alike commented on his situation, wondering if that meant he had been freed. Some offered legal advice and updates on what was happening in other cities.

“Maybe this is part of a random check, I am not sure if it is related to my immigration case,” he said.

An hour later, he gets some news.

And continued to post.

READ MORE: Affordable Housing Art Deco Style In Little Havana

“I feel the support of everyone here, from the officers, sheriff and other passengers. Thank you all. Still waiting in the room,” he updated.

Three hours after that, Sodagari’s released.

“At first I thought maybe it won’t happen to me. Maybe I’m different,” he said upon returning. “But as time passed, I realized I am eligible for those executive rules.”

His rush to turn to social media, he said, was part of his preparation.

“I wasn’t sure. I thought, maybe I’ll go through everything easily,” he said. “That would something like, really, I shouldn’t have it made a big deal. The other side was that I would get detained and I wouldn’t have access to anything.”

Although nervous, the CBP agents made him feel comfortable.

“They were very friendly, very professional,” he mentioned. “They explained all the processes, and why they’re doing this. And I understand. It’s their job.”

The president’s executive order included green card holders, which are permanent U.S. residents, in the refugee ban.

In a reversal on Sunday, however, White House Chief of Staff Reince Priebus said on CBS “Face the Nation” that the ban would not include green card holders, and they’d be able to return to the United States.

“If you’re a person that has a green card, for whatever reason, from Yemen, and you’re coming back and forth to Yemen into JFK, I think it’s reasonable to expect that a Customs & Border Patrol agent is going to have a few more questions for you to wonder why in the world, ya know, you keep coming back and forth from Yemen,” he said. “Now maybe it’s no big deal. But it does mean that that person traveling back and forth from one of those countries is going to get a few more questions.”

Of the 325,000 foreign travelers coming into the U.S., Priebus said, 109 were detained for questioning from the seven identified countries in the order. Most were released. A “couple dozen” remained for further questioning.

Border agents will have “discretionary authority” to detain and question suspicious travelers.

MORE NEWS: Residents Living Near Sharp Curve Along NW 87 Terrace Fed Up With Constant Crashes

“This is a process that President Trump had made and it’s a promise that he is going to keep,” Priebus added. “And he is not willing to be wrong on this subject. We need to do our best to be vigilant and protect Americans.”