A French historian on his way to a conference in Texas was detained for 10 hours by US border officials and threatened with deportation.
Officials at Texas A&M University said Henry Rousso was going to be returned to Paris as an illegal alien “due to a visa misunderstanding”.
The university stopped the deportation with help from a law professor, local news website The Eagle reported.
President Donald Trump has pledged to tighten US border controls.
“I have been detained 10 hours at Houston International Airport about to be deported,” Mr Rousso, 62, confirmed in a tweet on Saturday.
“The officer who arrested me was ‘inexperienced’,” he added.
The Egyptian-born Jewish scholar, a senior researcher at the French National Center for Scientific Research, is a specialist on French World War Two history.
Texas A&M University had announced to the conference on Friday that Mr Rousso had been detained upon arriving at Houston airport on Wednesday.
Senior official Richard Golsan said there had been a misunderstanding regarding the parameters of his visa, The Eagle reported.
“When he called me with this news two nights ago, he was waiting for customs officials to send him back to Paris as an illegal alien on the first flight out,” Mr Golsan told the meeting.
He said the university enlisted the help of law school professor and immigrant rights expert Fatma Marouf.
“Due to her prompt and timely intervention, Rousso was released,” Mr Golsan said.
Ms Marouf described the behaviour of customs officials as an “extreme response”.
“It seems like there’s much more rigidity and rigour in enforcing these immigration requirements and the technicalities of every visa,” she said, quoted by The Eagle.
Mr Rousso went on to attend the conference and thanked his supporters in a post on Twitter.
“Thank you so much for your reactions. My situation was nothing compared to some of the people I saw who couldn’t be defended as I was,” he said.
Last month, President Trump issued an executive order imposing a temporary entry ban for citizens of seven Muslim majority countries, although the list did not include Egypt.
The ban was later halted by a US federal court.