BOSTON, (Reuters) - U.S. immigration officials have detained an Iranian cancer researcher who was headed to a prominent Boston hospital to work as a scholar, a move that hospital officials protested on Tuesday.

The detention of Mohsen Dehnavi, along with his wife and three children, late Monday was unrelated to President Donald Trump’s executive order temporarily banning travelers from six majority-Muslim countries, according to U.S. Customs and Border Protection. Officials at Boston Children’s Hospital and an immigration law specialist protested the move, noting that Dehnavi had a valid entry visa.

“He and his family are being detained at Logan (and) are supposed to be sent back to Iran later today,” said hospital spokesman Rob Graham, in a statement. “Boston Children’s hopes that this situation will be quickly resolved and Dr. Dehnavi and his family will be released and allowed to enter the U.S.”

Two weeks ago, the U.S. Supreme Court upheld a revised version of Trump’s executive order banning travelers from Iran, Libya, Somalia, Sudan, Syria and Yemen, though the court excluded visitors with a “bona fide” family tie. The executive order itself did not apply to travelers with valid visas.

“This individual was deemed inadmissible to the U.S. based on information discovered during the CBP inspection for reasons unrelated to the executive order,” Customs said in a statement, adding that all foreigners seeking entry to the United States are evaluated for “health-related grounds, criminality, security reasons, public charge, labor certification, illegal entrants and immigration violations, documentation requirements, and miscellaneous grounds.”

Susan Church, chair of the New England Chapter of the American Immigration Lawyers Association, said her group objected: “The rules say if you have a valid visa you have to be let in.”

Dehnavi and his spouse and children, the youngest 7 months old, were detained late Monday, Church said in a phone interview.

During the 2016 presidential campaign, Trump had called for a “complete and total shutdown” of Muslims entering the United States, a move he said was necessary to protect national security following attacks at home and abroad by Islamist extremists.

Opponents of the idea called it a violation of the U.S. Constitution’s protection of free expression of religion.

Trump’s initial January order, which also applied to Iraq, caused a weekend of chaos at U.S. airports as travelers were turned away upon arriving on U.S. soil and crowds of thousands of people turned out to protest the move.