Egyptian student Emadeldin Elsayed has agreed to voluntarily leave the US after posting on Facebook that the world would thank him if he killed Donald Trump.
The 23-year-old student pilot was not charged with a crime but the authorities sought to deport him, his attorney, Hani Bushra, said.
Immigration authorities said they would allow Emadeldin Elsayed to return home voluntarily as long as he departed by July 5.
Emadeldin Elsayed is being held in a jail in California after his visa was revoked.
Hani Bushra said on March 7 that Emadeldin Elsayed’s detention was illegal.
“He’s being detained, I think, primarily because he’s a Muslim and he’s a Middle Easterner,” Hani Bushra told the AP news agency.
“This kid is going to become a poster boy for hating America.”
Secret Service agents interviewed Emadeldin Elsayed in early February after he posted a photo of Donald Trump on Facebook and wrote he was willing to serve a life sentence for killing the billionaire, and the world would thank him, Hani Bushra said.
Emadeldin Elsayed had said earlier that he never intended to hurt anyone. He said he wrote the post because of Donald Trump’s comments about Muslims.
Donald Trump, a front-runner in the race for the Republican nomination for the presidency, has promised a crackdown on immigration. He has vowed to build a wall along the entire Mexican border and called for a temporary ban on Muslims entering the United States.