On Tuesday morning, protesters dressed in bulky puffer jackets and salt-stained boots gathered outside the federal courthouse in Boston. They were there to support Shahab Dehghani, an Iranian student who was supposed to be starting his spring semester at Northeastern University, but instead had been abruptly pulled aside by customs officials and told that his visa was revoked when he landed at Logan International Airport on Sunday night.

But it was too late. Though Dehghani, 24, was supposed to appear in court that morning, the college student was no longer in the United States. He had been placed on a return flight to France the night before, just minutes after a federal judge issued an order saying he should be allowed to remain in the country until a court could review his case, his attorneys said.

“We feel this is a pattern of Customs and Border Protection ignoring court orders and ignoring the law,” Kerry Doyle, one of several immigration attorneys working on the Iranian national’s behalf, told reporters.

Protesters gathered in Boston on Jan. 20 to support Shahab Dehghani, an Iranian student who was detained at the airport. He was later deported. (Answer Coalition Boston via Storyful)

While it remains unclear why Dehghani was denied entry at the airport, the economics major’s case has angered immigration advocates and members of Congress who say that Iranian students are increasingly being deported or turned around at airports after arriving in the United States on valid student visas. In a statement to MassLive, Sen. Edward J. Markey (D-Mass.) called it “part of a disturbing pattern from the Trump administration of disregarding the law and targeting Iranian students."

Dehghani, whose full name is Mohammad Shahab Dehghani Hossein Abadi, began attending the University of Massachusetts at Boston in 2015 and later transferred to Northeastern, CommonWealth Magazine reported. After two years in Boston, he returned home to visit his family in Iran. But the break from his studies meant that he had to once again apply for a student visa.

Dehghani spent nearly a year waiting for the necessary approvals from the State Department, according to an emergency petition filed on his behalf. A week after learning that his F-1 student visa had finally been renewed, he boarded a flight to Paris, then another flight to Boston. But as soon as he touched down at Logan International Airport on Sunday night, he was taken into secondary screening by Customs and Border Protection officers and held overnight, the petition said.

In Boston, Dehghani was informed that CBP had revoked his visa and issued an expedited order for his removal. But he wasn’t given any explanation or the chance to contact an attorney, the petition said. By Monday night, word had spread, and dozens of demonstrators flocked to the airport’s international terminal while attorneys rushed to file an emergency motion.

The protests drew the attention of members of Congress, including Sen. Elizabeth Warren (D-Mass.), a presidential candidate, who wrote on Twitter this week that Dehghani’s deportation should be halted. Crediting international students with making the United States a better place, Rep. Joe Kennedy (D-Mass.), added: “This president treats every immigrant as a terrorist — that’s not what this nation was founded upon. Let him stay.”

In her emergency motion, Doyle said Dehgahni had passed the State Department’s vetting process just a week before. She alleged he had been singled out because of “additional scrutiny targeting Iranian citizens,” rather than any legitimate concerns about him. Within a matter of hours, Judge Allison D. Burroughs of the District of Massachusetts issued an emergency stay, putting Dehgahni’s removal on hold for two days and scheduling a court hearing for Tuesday morning.

But despite assurances to the contrary, attorneys say, CBP officers put Dehghani on a plane headed back to France. “THEY LIED,” tweeted Susan Church, one of the Boston-area immigration attorneys who have taken on the 24-year-old’s case.

At Tuesday morning’s court hearing, federal prosecutors insisted Dehghani’s flight had taken off before the emergency order was issued, MassLive reported. But court records obtained by the New York Times and BuzzFeed News show that the stay was granted shortly before 9:30 p.m. on Monday, minutes before the plane took off.

Though CBP officials have said that they were unaware of the judge’s order, advocates remain skeptical. On Tuesday, Rep. Ayanna Pressley (D-Mass.) tweeted she was “demanding answers” about why Dehghani had been put on a flight without due process. “We won’t stand for this,” she wrote.

Exactly why Dehghani was singled out in the first place remains unclear. CBP officials did not respond to a request for comment from The Washington Post late Tuesday night and told local media outlets that privacy laws prevent the agency from discussing specifics of the case. Markey told WBUR he hadn’t been able to get any answers, and university officials similarly expressed confusion.

“Twenty-four hours after learning that our student was detained and sent back overseas, we still have not received a satisfactory explanation from Customs and Border Protection for this action,” Northeastern University said in a Tuesday statement. “We believe that a clear explanation is needed, especially because the deportation took place after a 48-hour extension was granted by a federal judge. Only in the most extreme instances should students have their academic pursuits interrupted by government intervention.”

Doyle told reporters on Tuesday that CBP officials claimed Dehghani planned to overstay his student visa and remain in the United States permanently. “They are trying to claim that he somehow showed some indicia of wanting to return here permanently,” she said, according to MassLive. “There’s nothing here that shows that he has no long-term significant other here. His family is overseas. I mean, he’s just intending to pursue his degree.”

Another possible explanation emerged later on Tuesday, when an official with the Department of Homeland Security told Reuters that Dehghani was believed to have relatives with business ties to the terrorist group Hezbollah. The 24-year-old’s attorneys have said that’s not true, and the fact he was flagged was probably the result of a mix-up or a case of mistaken identity. (Dehghani is a fairly common last name in Iran.)

“He went through an extensive processing period before he came back, which means that overseas investigators investigate his family, they speak to employers, they do a very thorough investigation,” Church told the Boston Globe.

Though Tuesday’s court hearing took place as planned, Judge Richard G. Stearns of the District of Massachusetts dismissed the case as moot because Dehghani had already been deported, and he didn’t feel that he had the authority to order the agency to reverse its decision, WBUR reported.

But the battle may not be over: Carol Rose, the executive director of the ACLU of Massachusetts said in a Tuesday statement that it is “looking at all options to hold CBP accountable for wrongfully deporting Iranians and other students who hold valid visas.”

Earlier this month, the Guardian reported at least 10 Iranian students with valid visas had been denied entry at U.S. airports since August. Seven of the students had flown into Boston. Church told CommonWealth, which documented several other similar instances of students being denied entry at Logan International Airport, that she and other attorneys have grown concerned that a “rogue” CBP officer is behind the deportations.

“This is not an isolated incident,” she told WBUR. “This is a pattern of misbehavior by this administration who lacks respect for the rule of law and lacks respect for the individuals here who are coming here just to attend school and to get a degree and to further their knowledge.”