An Iranian scientist coming to the U.S. to aid cancer research was detained at Boston’s Logan International Airport with his family on Monday and will be sent home on the next scheduled flight.

It’s unclear why the scientist, Seyed Dehnavi, his wife, and their three young children were detained. He has a J-1 visa, which means President Donald Trump’s travel ban would not apply to him, and he was set to conduct research at Boston Children’s Hospital.

Customs and Border Protection confirmed the family had been denied entry to the U.S. for reasons unrelated to the travel ban, but declined to elaborate, citing privacy laws.

A friend of Dehnavi’s who asked to remain anonymous told HuffPost that the scientist flew from Tehran to Doha to Boston, and texted him around 3 p.m. on Monday to say he had arrived with his wife, their infant son, and their daughters, ages 6 and 3. Then Dehnavi went quiet.

The friend said he eventually asked customs agents at the airport what was going on, and said they told him the family was denied entry because of a document issue.

Trita Parsi, head of the National Iranian American Council, tweeted a copy of what he said was Dehnavi’s visa.

What #MuslimBan is doing RIGHT NOW. Harvard researcher at Children's hospital (+3 kids) WITH VALID VISA about to be deported @BostonLogan pic.twitter.com/r1oN9Ac7Ca — Trita Parsi (@tparsi) July 11, 2017

Before traveling to the U.S., Dehnavi had asked Harvard University, which is affiliated with Boston Children’s Hospital, whether Trump’s travel ban would affect him. The Supreme Court allowed pieces of the ban to go into effect last month. Harvard told Dehnavi the president’s order would have no impact on him, his friend said.

Trump signed an executive order in January seeking to bar nearly all nationals of certain Muslim-majority nations, including Iran. He signed a second, slightly narrower version in March after the first was blocked by courts. Both orders threatened important research, according to scientists, and could keep people from coming to the U.S. for their work.

Customs and Border Protection noted in a statement that having a valid visa doesn’t guarantee entry into the U.S. Individuals must first show they are eligible for admission in an inspection with a Customs and Border Protection officer. They can be rejected on more than 60 grounds by law, including security, health, criminality, labor certification, immigration violations and document requirements, Customs and Border Protection said in a statement.

Boston Children’s spokesman Rob Graham said in an email that the hospital “hopes that this situation will be quickly resolved and Dr. Dehnavi and his family will be released and allowed to enter the U.S.”