(CNN) They left Iran with valid visas in hand. But hours after landing in the US, they were forced to turn back on flights they never expected to take.

From Massachusetts to Michigan, reports are on the rise of authorities detaining and deporting Iranian students at US airports. A 27-year-old engineer who'd planned to get a doctorate at Michigan State University was deported from Detroit Metro Airport on Monday . A week earlier, a 24-year-old Northeastern University student was escorted onto a plane in Boston as protesters at the airport pushed for his release.

For the students, it's devastating. For immigrant rights advocates, it's a troubling pattern emerging as tensions run high between the US and Iran . And for American universities hoping to convince the world's top students to study in their classrooms, it's causing concern -- even though the overall number of cases is still relatively small.

"Campuses are much more worried about what happens at the port of entry than they used to be ... because it is so unpredictable and so apparently random," says Terry Hartle, senior vice president of the American Council on Education, which represents about 1,800 colleges and universities. "It used to be that you would breathe a sigh of a relief when your international student got their visa. Now you breathe a sigh of relief when they get to campus."

US Customs and Border Protection says its inspections take additional factors into account and can uncover details that didn't come up in previous visa screenings.

There's no guarantee, the agency says, that someone with a visa will be allowed to enter the United States. And every day, hundreds of people are denied entry at US ports.

But advocacy organizations, rights groups and immigration lawyers say the situation they've seen unfolding recently is far from business as usual.

"Something's different now," says Ali Rahnama, legislative counsel for the Public Affairs Alliance of Iranian Americans. "Deportation of this number of students is not normal."

Advocates say many of the students were deported in Boston

CBP hasn't released statistics on how many Iranian students the agency has denied entry and removed from the country in recent months. And the agency says it can't reveal details about individual cases due to privacy restrictions.

So lawyers and advocacy groups are using word of mouth to come up with tallies of their own.

At least 17 Iranian students have been deported from the US since August, according to Rahnama, who's spoken with most of them as he tries to get a handle on what's happening. It's a notable increase from previous years, Rahnama says, when one or two cases would come up annually.

Advocates say many students in the recent wave of cases were deported from Boston's Logan International Airport -- at least 11 of them, by one attorney's count.

Carol Rose says the trend is clear. But the reasons behind it, she says, remain a mystery.

"We don't know whether this is a decision by the Boston CBP office, or whether this is a decision coming from the Trump administration, because it's all being done in secret," says Rose, the executive director of the American Civil Liberties Union of Massachusetts. "Maybe it's because we have a lot of students coming, because we're a center of higher education. Or it may well be there's just a decision by some rogue agents here who have a personal dislike for people from Iran. We just simply don't know."

Cassidy Taylor offers support to a deported Iranian student while protesting outside the federal courthouse in Boston on January 21.

Asked why more cases appeared to be coming up at Logan, CBP spokesman Michael S. McCarthy said that in 2019 less than 1% of Iranian travelers arriving at the Boston airport were denied entry.

"CBP has established strict oversight policies and procedures to ensure traveler screening practices adhere to all constitutional and statutory requirements," McCarthy said in a written statement. "CBP is committed to protecting the civil rights and civil liberties of every individual whom we encounter. Our officers are trained to enforce U.S. laws uniformly and fairly and they do not discriminate based on religion, race, ethnicity or sexual orientation."

A case surges into the national spotlight

Protesters packed the airport's arrivals lounge last week, holding signs that said, "Protect Iranian Students" and "Stop Discrimination Against Iranians." They'd heard a Northeastern University undergraduate had been held for questioning after arriving at Logan and was on the verge of being deported. They cheered when they learned a federal judge had issued an order temporarily blocking any efforts to remove him.

But the next day, the case surged into the national spotlight. Mohammad Shahab Dehghani Hossein had been deported despite the judge's order.

"We don't know what happened with that or why that happened," says Kerry Doyle, an attorney representing Dehghani. "That's very troubling if CBP believes that they don't have to listen to the federal court."

CBP officials have said they didn't know about the order when they put the 24-year-old on a flight to Doha.

Dehghani's attorneys had argued in court that his visa was revoked because of additional scrutiny targeting Iranians.

A Department of Homeland Security official told CNN there's more to the story.

Dehghani was denied entry into the US in part because CBP officials believe his father had an affiliation with a US-sanctioned transportation company that allegedly provided weapons to Hezbollah on behalf of the Islamic Revolutionary Guard Corps, the official said.

Asked about the allegation, Doyle says she thinks it's "highly unlikely" something like that would have been overlooked by other agencies as the State Department investigated Dehghani for more than a year before issuing his student visa earlier this month. She accused officials of leaking allegations to avoid facing any review or criticism of their actions.

"What's going on with CBP? To me that is the ultimate question," Doyle said. "They can't escape answering questions on their actual behavior and culpability here. It's part of a pattern that needs to be answered to."

Why universities are concerned

Hartle sees the situation as part of an even larger trend.

"The number of international students, after increasing steadily for a decade, has leveled off in the United States," he says. "We think the reason is because America is simply seen as less welcoming than it used to be to international visitors."

The uptick in students being turned back is weighing on universities, Hartle said, even though -- relatively speaking -- it's rare. According to the latest government statistics , there are more than 1 million international students in the United States, and more than 12,000 of them are Iranian.

"We're worried about the environment for international students," Hartle says. "We're worried about any student, whether they are from Iran, China or Germany. It doesn't matter."

Schools, Hartle says, struggle to advise students as the situation shifts.

"It's hard to know how best to advise students, except to say, 'When you get to the port of entry, anything can happen.' And that's not the message that we would like to send to international students. We want to be open and welcoming."

At Northeastern University, where two of the Iranian students deported in the past six months were enrolled, school leaders have been trying to send a message of support to international student on campus. Jigisha Patel, the university's assistant general counsel and chief adviser for international and immigration services, says it's not common for students to be turned back at ports of entry.

"But when it happens, it does cause a lot of anxiety and concern. And that's what we hear from our community," she says.

Students, Patel says, are worried that the lengthy processes they've gone through to get visas from the US government -- with background checks lasting months or sometimes even more than a year -- could be undone in a matter of hours by an official at the airport.

"We would not want someone's educational objective to be ruined because of quick decisions. We want to make sure that our students have the same rights as anybody else and that they are able to pursue their educational objectives," she says. "We want to make sure that the where the government is taking action where it causes an interruption, that it's limited circumstances and that they really are warranted."

In recent months, two Northeastern University students from Iran were denied entry and deported from Boston's Logan International Airport.

CBP officials say there's an important distinction between the vetting that occurs before a visa is issued and a customs officer's inspection. CBP is making sure someone has proper documentation, factoring in security considerations and also looking at "the totality circumstances at the moment that they are seeking entry into the United States," says Dan Tanciar, the agency's executive director of field operations.

"The visa is permission to knock on the door of the United States," he says, "and upon arrival it is then CBP that will make the final determination of whether or not they meet all the criteria for admissibility."

One student says questioning 'was like an official inquisition'

During interviews with CNN this week, several deported students and their attorneys detailed their experiences at US airports, describing what they said were hours of questioning that left them feeling exhausted and confused.

Asked why the students had been denied entry and removed from the US, CBP said it couldn't reveal details of individuals' processing due to privacy restrictions.

Reihana says she's still shaken, months after leaving Logan on a flight she never expected to take.

The 35-year-old traveled to Boston in September to begin a master's in theological studies program at Harvard Divinity School. Once she arrived at the airport, she says CBP officials grilled her about Iran, her political opinions and an attack on a Saudi oil field that had occurred just days earlier.

"I didn't know anything about it. I just was packing my luggage. ... It was like an official inquisition. It was very strange. I'm an ordinary student. I'm not a political person or a diplomat," says Reihana, who asked to be identified only by her first name because she said she was afraid she'd face repercussions for speaking publicly about her case.

After about nine hours of questioning, Reihana says the officials told her they were revoking her visa and sending her back to Iran. For five years, they said, she wouldn't be able to return.

She'd quit her job. She'd turned down an opportunity to study in Europe. All for the chance to study at Harvard.

"It was a real trauma. And I'm still shocked," she says. "It's like, in a few hours, all of the open ways got closed for me."

Months later, Mahla Shahkhajeh found herself in a similar situation.

The Ph.D. student in industrial engineering flew to the US in late December. She had a connection at Logan and was on her way to visit friends in Minneapolis before beginning her doctoral program at Iowa State University.

But the 26-year-old says her stop at the Boston airport didn't go as planned. CBP officers questioned her for hours, she says, asking her repeatedly about her work at a packaging company and eventually telling her they wouldn't be letting her into the US.

For Shahkhajeh, the news was devastating. She'd spent the equivalent of a year's salary already applying to the university and traveling to get the student visa.

"I never thought that this would happen to me," she said. "The officer gave me some papers to sign. And I couldn't actually read them because I was so upset."

Officials said they'd placed the paperwork inside her luggage, but she says when she returned to Iran, it wasn't there.

Shahkhajeh says the only written evidence she has of what happened is the visa the US government once gave her. Now there's a bright red stamp plastered across it: "CANCELLED -- BOS."

All the plans she'd made for her future, she says, were canceled that day, too.