DES MOINES, Iowa -- A Palestinian immigrant who was jailed in Iowa for two years while awaiting deportation has been released after a federal judge ruled he had been held for too long without a reasonable expectation of being repatriated soon.

Hasan Salama Dibai Ghithan was released last week.

Advocates for immigrants' rights say Ghithan's case is not unusual and that far too many immigrants awaiting deportation are jailed indefinitely

because they don't know how to navigate the U.S. legal system.

Ghithan is 33 and was born in Ramallah in the West Bank. He says he was jailed in January 2017, as he tried to renew his green card, after immigration officials discovered he had been convicted on a drug charge in Texas.