After more than a month in a central Louisiana detention center, a University of Alabama doctoral student opted Thursday to return to his native Iran “to avoid prolonged and unnecessary detention,” his lawyer said.

Alireza Doroudi, 32, who was arrested March 25 near his home in Tuscaloosa on an allegedly revoked visa, appeared before Judge Maithe Gonzalez inside the ICE detention facility in Jena and made the “difficult decision to ask for and was granted voluntary departure,” attorney David Rozas said in a statement.

Doroudi wasn’t detained for a crime, but for a revoked visa and an allegation that he was not “in status.” Rozas said Thursday that records submitted in court show that the revocation was only supposed to take effect if Doroudi left the United States.

“This acknowledges that the initial reason for arrest 45 days ago was in error,” Rozas said. He added that Gonzalez, the judge, refused a fresh request for a bond for Doroudi, who then chose to leave voluntarily rather than remain locked up any longer.

“He turned and looked at me and said, ‘I love this country, but they don’t want me here so I will go home,'” Rozas said.

Doroudi was swept up in President Donald Trump’s immigration crackdown, which has resulted in several high-profile student detainees landing in ICE detention centers operated privately in Louisiana.

Among them is Mahmoud Khalil, the former Columbia University graduate student and Palestinian activist. The Trump administration claims Khalil’s beliefs present a threat to foreign policy interests, according to a memo from U.S. Secretary of State Marco Rubio. On Wednesday, a federal judge in New Jersey told the government to spell out the legal precedent for its plan to deport Khalil, according to Reuters.

Also Wednesday, a federal appeals court ordered the return of a Tufts University student from Turkey to New England to decide if her rights were violated, the Associated Press reported. Rumeysa Ozturk, who helped pen an op-ed last year criticizing the school’s response to Israel’s war in Gaza, was held at an ICE facility in Basile, Louisiana for more than six weeks.

101324 Jena LaSalle map

The complex in Jena where Doroudi and Khalil both were held, called the Central Louisiana ICE Processing Center, is one of several privately run facilities under government contracts that have made Louisiana the second-leading state for U.S. immigrant detainees, behind only Texas. Several thousand detainees are now being held in the Pelican State.