Vahideh Rasekhi, an Iranian sixth-year doctoral student in Stony Brook University’s linguistics department, and other detainees were released from Kennedy Airport Sunday after being held under a U.S. entry ban issued Friday by the White House.

She was released at 2:30 p.m., saying “I’m exhausted” as she hugged and kissed her friends and attorneys at the airport’s Terminal 4.

Rasekhi is pursuing a doctorate in linguistics and is president of the Graduate Student Organization, SBU spokeswoman Lauren Sheprow said.

Her detainment, a result of President Donald Trump’s executive order banning entry of non-U.S. citizens from seven Muslim-majority countries, exceeded 24 hours, said Mehdi Namazi, a friend of Rasekhi’s.

Outside Terminal 4, Rasekhi said she was “super scared” that she would eventually be deported.

Federal officers asked her “regular, simple visa questions,” and she understood those who detained her “have to do their jobs,” Rasekhi said.

advertisement | advertise on newsday

About 10 of her friends gathered Sunday morning at Terminal 4 waiting for news about Rasekhi’s detention, Namazi said.

“Everyone knows her,” Namazi said, adding that “she’s very famous” on campus.

Namazi, 29, a fifth-year doctoral student from Iran studying physics, said a federal judge’s ruling Saturday night issuing a stay on Trump’s executive order for immigrants in transit with valid visas, has left families puzzled. “That’s why they’re stuck. There’s a law preventing to let them in, and there’s a law preventing officers to deport them.”

Rasekhi left for Iran to visit her family the day after Trump was elected president, her roommate Agatha Lyczek said.

Lyczek, 29, of Port Jefferson Station, said the two spoke shortly after Rasekhi arrived in Iran, and her roommate told her she was “really scared” about being able to return.

Another Stony Brook student named Sahar, 32, who declined to provide her last name, said she was waiting for her parents, who were detained coming to visit her after not seeing her for 3 1⁄2 years. They received their visas earlier this month.

“I never expected to welcome them to the United States like this,” said Sahar, who has a student visa.

Every hour or so, detainees left Terminal 4 and were greeted by relatives and attorneys, to the sound of thunderous applause.

advertisement | advertise on newsday

The Central Diner, a cafe in the terminal, became a hub for attorneys who volunteered to assist with the cases of detainees.

“There’s a lot of energy and willingness to come forward and help,” said Camille Mackler, director of legal initiatives at the New York Immigration Coalition, who estimated that “hundreds” of attorneys came forward this weekend. Rep. Hakeem Jeffries (D-Brooklyn) said those attorneys ranged from law firm associates to partners.

In a statement issued after Rasekhi’s release, Stony Brook president Samuel L. Stanley Jr. said that for the duration of Trump’s executive order, the school is advising students from the seven countries named in the travel ban “not to travel outside the United States unless absolutely necessary. Even after the 90-day period is complete, we are not sure how the visa or port of entry requirements may change and we are urging caution.”

State University of New York chairman H. Carl McCall and Chancellor Nancy L. Zimpher, in a statement issued Sunday, noted that the school system “our commitments to diversity, equity, and inclusion are unwavering. Our founding principles and support for undocumented students, restated by the SUNY Board of Trustees at its meeting last week, continue to guide our actions as we review and react to new federal mandates with regard to immigration.”

Selden resident Abdulelah Othman — a green card-carrying Yemeni citizen visiting his ailing mother in Saudi Arabia — remained there Sunday, his wife said.

advertisement | advertise on newsday

“It’s not looking promising,” Gundrum said in a telephone interview.

Comments from White House Chief of Staff Reince Priebus on Sunday stating that holders of green cards are not subject to the ban “going forward” did little to ease Gundrum’s concerns.

“I’m worried they will not allow him on a plane because he has a Yemen passport,” she said.

The executive order bars people from Iraq, Syria, Iran, Libya, Somalia, Sudan and Yemen from entering the United States.

“We thought because he had his green card he’d be safe — no one knew something like this was going to happen,” Gundrum said.

With Alison Fox and Lisa Irizarry