Students and staff in Nottingham protested against his arrest
A University of Nottingham employee who was facing deportation to Algeria after being held as a terror suspect has been released from custody.
Hicham Yezza, 30, was arrested along with Rizwaan Sabir, 22, on suspicion of possessing extremist material. Both were detained under the Terrorism Act.
Both men were later released without charge. Mr Yezza was then rearrested on suspicion of an immigration offence.
Mr Yezza has now been granted bail following an immigration hearing.
He had been held at the Colnbrook Immigration Detention Centre near Heathrow.
Hundreds of people had protested against his deportation and an application for a judicial review was issued to the High Court in London.
Cannot play media. Sorry, this media is not available in your territory.
Yezza says his experience was 'surreal'
Mr Yezza told BBC News: "It has been extremely surreal at times (being held in detention) but most of all it has been harrowing.
"But it has also been an inspiring and humbling experience because I have realised how many people out there are willing to do everything they can to defend justice."
His defence team are now hoping they can prove Mr Yezza overstayed his visa due to a simple misunderstanding.
Mr Yezza and Mr Sabir were arrested at the university during an operation in conjunction with the Midlands Counter-Terrorism Unit on 14 May and released on 20 May.
Mr Yezza was cleared of any involvement in terrorist activity after police found he had been passed an al Qaida training manual by postgraduate student Rizwaan Sabir to print.