A FEDERAL JUDGE issued a 48 hour stay of the deportation of an Iranian student enrolled at Northeastern University, who arrived back in the US on Sunday night and was detained by immigration officials at Logan Airport.

US District Court Judge Allison Burroughs issued the ruling on Monday night less than two hours after attorneys for Shahab Dehghani filed an emergency petition in the case.

Dehghani, 24, began attending the University of Massachusetts Boston in 2015 before transferring to Northeastern. He had returned to Iran and reapplied for a student visa, which took almost a year to be approved.

When Dehghani’s connecting flight from Paris arrived in Boston on Sunday at about 5 p.m., however, he was made aware that he would not be allowed to remain in the US, despite being cleared to study here.

Mehran Dibaji, a friend of Dehghani’s, said “someone at the airport called his housemate” saying “they’re deporting your friend.” He added that Dehghani, who he described as “very peaceful and very friendly,” had left Northeastern temporarily to visit his family, since the travel bans from 2017 bar most Iranians from staying in the US. Dehghani’s family found out about his detainment through his friends, he said, not from border patrol.

Immigration activists quickly spread word of Dehghani’s potential deportation, and more than 100 demonstrators gathered Monday night at the international terminal at Logan, holding signs protesting his possible removal. According to court records, his visa was revoked during an arrival interview despite it being valid.

Dehghani’s attorney, Susan Church, learned he was being detained Sunday night after he had been held by Customs and Border Patrol for several hours.

Customs and Border Patrol said it cannot comment on an individual’s processing due to the Privacy Act. A spokesman said that applicants must “demonstrate they are admissible into the US by overcoming all grounds of inadmissibility.”

Church’s firm, along with the Boston immigration law firm Graves & Doyle, filed the emergency federal petition Monday night eight minutes before Dehghani’s flight back to Iran was scheduled to take off. Burroughs, who temporarily blocked any action by immigration officials to deport Dehghani, scheduled a hearing in the case for 10 a.m. on Tuesday before US District Court Judge Richard Stearns.

“We have been in touch with federal officials to learn more about this case and to provide our student with the appropriate assistance to facilitate a successful return to Northeastern,” said Northeastern spokeswoman Renata Nyul.

Northeastern University student Shahab Dehghani, photo from handout.

“They approved him to come in,” Church said of Dehghani’s receipt of a student visa. She said local immigration attorneys are concerned there is a “rogue” Customs and Border patrol officer at Logan Airport. They say that out of 10 recent deportations of Iranians in the US, seven have been in Boston. The Guardian has reported the issue, and CommonWealth has verified two other instances where an Iranian students have been deported.

Church decried the Trump administration’s “xenophobic policies and Logan Airport’s troubling practice of sending students back to Iran.”

Iran was one of several countries included in President Trump’s travel ban issued in January 2017 shortly after he took office. Iranian students can only study legally in the US if they had a student visa prior to that date or if go through a waiver process with the State Department. Church was among a group of attorneys who successfully sued Trump over his travel ban directed at Muslim countries.

The case is getting national attention, especially among immigrant rights groups. “This was someone who went through the arduous process of procuring a visa only to have been denied entry into the US by CBP officials who seem to be operating on policies that are opaque and discriminatory.” said Jamal Abdi, the president of the National Iranian American Council, a nonpartisan, nonprofit organization advancing interests of Iranian-American community.

The ACLU of Massachusetts is supporting the lawsuit. Carol Rose, the organization’s director, was at the airport Monday night. The ACLU is working to ensure “due process and justice for students with valid visas,” she said. “The fact that this is happening on Martin Luther King Day is simply shameful.”

Sources at Congressman Joe Kennedy’s office say he made multiple calls to Customs and Border Patrol Monday to try and intervene on Dehghani’s behalf. “He was stonewalled and slow-walked repeatedly and given the impression the agency was trying to run out the clock,” one person in Kennedy’s office said.