A US court has ordered the release of an Arab-American former professor who had been in jail for five years after he was accused of being a Palestinian terrorist.
Sami al-Arian was freed on Tuesday after US immigration officials failed to explain his continued detention pending a trial for refusing to testify before a grand jury about a cluster of Muslim organisations in northern Virginia.
"We are obviously relieved and delighted,'' Jonathan Turley, al-Arian's lawyer, said.
But the former computer engineering professor at the University of South Florida, in custody since early 2003, is not yet fully free.
He must remain under home detention at his daughter's residence in Virginia, pending trial.
In February 2003, federal prosecutors charged al-Arian with being a leader of the Palestinian resistance movement, Islamic Jihad, which the US has labelled a "terrorist organisation".
A jury acquitted him of eight charges out of the 17 against him but was deadlocked on the others.
Al-Arian later struck a plea bargain and admitted to lesser charges of conspiring to aid the group by helping a family member with links to it to get immigration benefits, and by lying to a reporter about another person's links to it.
He was sentenced to nearly five years in prison, during which time federal prosecutors sought his testimony for a grand jury investigation.
Last month US District Judge Leonie Brinkema postponed the contempt trial and questioned whether the charges violated the terms of al-Arian's plea agreement which bars the justice department from standing in the way of his deportation after he has served jail time.