An student from Egypt who is studying at a flight school in Southern California and facing deportation for a threat posted on Facebook against Donald Trump one of the GOP presidential candidates was given the authorization to leave the U.S. voluntarily, said a spokesperson law enforcement.

During a Friday morning hearing, at a downtown U.S. Immigration Court in Los Angeles, a judge granted Egyptian Emad Elsayed a voluntary departure to leave the U.S. and return to Egypt.

He is to be escorted by ICE or Immigration and Customs Enforcement officers said a spokesperson from the agency.

Elsayed is in custody and must leave the U.S. within 120 days.

Hani Bushra his attorney asked the judge for bond, which the judge denied. Bushra has said that his client felt he did not have any other option other than leave the U.S. voluntarily.

Bushra said the student would return to his family in Cairo. He made a big mistake that he regrets and will be facing the regret for years to come, said his attorney.

Elsayed is 23 and was detained February 12 by officers of ICE for an alleged violation of his admission terms to the U.S. Elsayed was arrested where he is taking flight training and is currently at the Orange County jail.

On February 3, Elsayed posted on Facebook an article about Trump calling for a ban on all Muslims entering the U.S.

The student included a comment of his own in which according to documents in court he said he would not mind being given a sentence of life for killing Trump.

In Los Angeles, a law enforcement officer said you cannot threaten a major candidate in the presidential race, especially when a guest in the country. He added that those things are investigated and taken very seriously regardless of the nationality of the person or religious background.

He had his student visa revoked when the flight school he was attending withdrew its support for the same, said his attorney.

Get Analysts' Upgrades and Downgrades Daily - Enter your email address below to receive a concise daily summary of analysts' upgrades, downgrades and new coverage with's FREE daily email newsletter.