Mehdi Zeyghami's number had finally come up.

For eight months, the 34-year-old Iranian waited for his visa so he could return to Tampa to finish his Ph.D. work on solar energy technology at the University of South Florida. He had put his life on hold to return to Tehran last May to care for his mother after she had open-heart surgery.

On Thursday, his case number popped up on the U.S. Consulate's website. His visa was ready and it looked like he would make it back to Tampa in time for the spring semester. He booked a flight to pick it up at the U.S. Embassy in Armenia.

"I was so happy," Zeyghami said Tuesday. "I packed my bags. I was ready to go."

Then on Friday afternoon, President Donald Trump signed the executive order that, in part, barred nationals from Iran and six other countries from entering the United States for 90 days. On Monday, Zeyghami received an email saying his visa had been refused. It cited the order, 212(f).

His dreams have been deferred again, indefinitely.

"I've invested so much into it," Zeyghami said in a phone interview from his mother's house in Tehran. "I feel like I'm losing everything."

• • •

Trump's order pauses America's entire refugee program for four months, bans all those from war-ravaged Syria indefinitely and suspends for 90 days any immigration from Iraq, Syria, Iran, Sudan, Libya, Somalia and Yemen. The president says the order will protect the United States from terrorists. Critics have called it an unconstitutional overreach.

Iranian students represent a disproportionate number of students from the seven countries. According to the Institute of International Education, a nonprofit group that does an annual survey of foreign students in America, there were 12,269 Iranian students in the United States last academic year. The country with the second-highest total among the seven was Iraq, with 1,901.

USF counts 123 students from the seven countries enrolled for the spring semester; 78 of them are from Iran.

For Zeyghami, finishing his Ph.D. would be the culmination of a lifetime of education and more than four years of work at USF.

He earned his bachelor's and master's degrees in mechanical engineering in Tehran and discovered the work of Yogi. D. Goswami, a distinguished professor of chemical engineering and director of USF's Clean Energy Research Center.

"I decided if I wanted to do something meaningful with my life, I wanted to learn from this guy," Zeyghami said.

He applied to USF and was accepted. He came to the United States on a student visa five years ago. His research at the Clean Energy Research Center focused on passive cooling technology for solar equipment, buildings and other structures. He lived in an apartment north of campus, worked as a graduate assistant and became vice president of the Florida Renewable Energy Association.

During his time here, Zeyghami resisted the urge to return to Iran when his uncle and grandmother died and when his niece was born because he would have to go through the visa process again to return and finish school. Then his mother fell ill.

Once she improved, he applied for another visa in hopes of returning for the fall 2016 semester. But the process didn't move quickly enough. Zeyghami had to give up his Tampa apartment and many of his belongings. He could not accept an award for his work this month from the American Society of Heating, Refrigeration and Air-Conditioning Engineers.

Then came word that his visa was ready. Then it wasn't.

Goswami said he worried when Zeyghami said he was returning to Iran because there was no guarantee he could get back. His dissertation is part of an effort to develop technology that cools building and other structures by radiating the heat into space, Goswami said.

"It's very unfortunate that he's in this situation because he was making great progress in his research," he said. "He's so far advanced in his Ph.D. study it would be a shame if he can't come back to finish."

But Zeyghami still has more experimental research to conduct before he can finish his dissertation. Goswami isn't sure Zeyghami can do that specialized work in Iran. USF will work to try to find a solution if Zeyghami can't return, Goswami said.

Goswami, who emigrated from India nearly 50 years ago, said the changes in immigration policy made him think about Zeyghami and all the other USF students and researchers who travel from foreign lands.

"They become ambassadors in those places because they feel so thankful and blessed to be able to come to the U.S. and be exposed to the topmost researchers in the world," he said. "Those are the people we need all over the world."

• • •

If he can't make it back in summer, Zeyghami worries he won't be able to return at all because he has already twice extended his I-20 certificate, a document issued by the Department of Homeland of Security allowing foreign students to study in America.

"I will lose the whole thing," he said. "The Ph.D. and the four and a half years I spent there."

On Monday, Zeyghami resigned his position on the energy association board and might have to forfeit the prize from the engineering society. Once he finished with his education, Zeyghami planned to return and continue his research in Iran as a university professor.

Along with the disappointment, Zeyghami is puzzled by the targeting of his people. President Trump said the order was designed to protect Americans, but Iranians come to the United States to learn and contribute, Zeyghami said, not to kill people.

He urged Americans to stand up against the order. And he has a message for the president.

"Making America great is not possible with hatred," he said. "Banning students from their schools and preventing them from reaching their dreams would not make America safer. You need love and support of all Americans and immigrants if America is going to be the great place as you dream of it."

Contact Tony Marrero at tmarrero@tampabay.com or (813) 226-3374. Follow @tmarrerotimes.