A former Drexel University student jailed since 2019 for lying about his contact with anti-American insurgents in Yemen will be released from custody and immediately deported under a deal approved Thursday by a federal judge in Philadelphia.

FBI agents arrested Gaafar Mohammed Ebrahim al-Wazer, a Yemeni national, 17 months ago, shortly after he attempted to schedule a White House visit and abruptly withdrew a request to renew his legal immigration status, citing U.S. involvement in a brutal civil war in his native country.

At the time, al-Wazer had already been under federal surveillance for years because of images and memes on his Facebook page, including one that appeared to depict him with an assault rifle at a military-style training camp in the Middle East under a caption that read: “He hates all Americans, death to all Americans, especially Jews.”

» READ MORE: Ex-Drexel student charged with hiding past training with anti-American rebels in Yemen (from November 2019)

Other photos and posts showed al-Wazer with known members of the Houthi rebel movement, a fanatical Shiite militia supported by Iran which has been at war with Yemen’s internationally recognized government and U.S.-backed Saudi Arabian forces since 2014.

“If the United States is not supporting peace in my country, how is it going to help me when I am in its homeland?” he wrote in his October 2019 letter withdrawing his immigration application. “I am not in need to you. I have Allah with me.”

Al-Wazer, 26, declined to address those sentiments in court Thursday as Chief U.S. District Judge Juan R. Sánchez signed off on the deal he struck with prosecutors arranging for his deportation to Oman within hours of the hearing.

“We believe that the sentence of time served is an appropriate sentence in this case,” said al-Wazer’s lawyer, Peter J. Thompson. And after receiving assurances from prosecutors that FBI agents had not uncovered evidence that al-Wazer posed an “operational” threat to U.S. security, the judge agreed.

Specifically, al-Wazer’s plea agreement required him to admit only to lying to federal immigration officers in his 2018 application to renew his temporary protected status — a designation allowing immigrants from certain nations roiled by war or other crises to temporarily live in the United States.

Asked whether he had ever taken sides in the conflict, he told an interviewing officer he had not.

But that was only the most recent incident in which al-Wazer had attempted to hide his affiliations and contact with the Houthis, prosecutors alleged in court filings.

“Al-Wazer is of course entitled to hold and lawfully express his political and religious opinions as freely as anyone else in this country, no matter how hateful or odious they may be,” Assistant U.S. Attorney Nelson S.T. Thayer wrote. “However, [he] is not entitled to lie about those beliefs when asked about them by U.S. immigration and counterterrorism officials.”

» READ MORE: Feds: Ex-Drexel student, who trained with anti-American rebels, sought White House visit days before his arrest

Al-Wazer landed on agents’ radar within two years of arriving in the country in 2014 on a student visa to study English. Staff at his language program at Drexel expressed concerns over postings on his Facebook page.

But by the time agents showed up to interview him that afternoon, al-Wazer had allegedly deleted the posts and then maintained that he had no ties to Yemeni rebels. Still, while talking with agents, he said he was disgusted by U.S. involvement in controversial bombing raids the Saudis have undertaken in Yemen and expressed sympathy for the Houthis, who have seized most of his native country.

The FBI ultimately let him go. But Drexel moved to suspend al-Wazer that day.

When he was told he could not return to campus, he allegedly refused to leave, pushed his way into a classroom, and began angrily confronting the staff.

The incident so unnerved al-Wazer’s teachers that one fled the building, prosecutors said in court filings.

That was not the first time al-Wazer had become violent on the campus, prosecutors said. A year earlier, he allegedly assaulted a professor during a student conference after forcing his way into a classroom as the professor tried to keep him out.

In the years that followed, al-Wazer moved to Altoona, where he attended Mount Aloysius College, made the dean’s list three years running, worked as an Uber driver, and was set to transfer to California University of Pennsylvania in Washington County last year.

But in October 2019, he sent his letter condemning U.S. involvement in Yemen and renouncing his immigration status. Within weeks, he signed up for a White House tour — a development that raised concern among the Secret Service.

U.S. counterterrorism investigators arrested al-Wazer days afterward and he has remained in federal custody ever since.

His lawyer said Thursday that al-Wazer has been a model prisoner with no disciplinary infractions throughout his nearly two years of incarceration and has spent most of his time in custody improving his English, reading, and playing soccer with other inmates when coronavirus restrictions allowed it.

He was expected to board his flight to Oman under the custody of federal agents Thursday evening.