Egyptian prosecutors appealed on Wednesday against a court's decision to release a 20-year-old man imprisoned two years ago on his way home from a peaceful protest while wearing an anti-torture T-shirt.

Mahmoud Mohamed Hussein's release had been ordered by an Egyptian court. 

Inside Story - Can Egyptians recover their 'lost' revolution?

On Wednesday, however, Wade H McMullen Jr - managing attorney at the US-based Robert F Kennedy Human Rights group, which has acted on behalf of Hussein - said prosecutors had appealed the decision.

Egyptian media and Mokhtar Mounir, an Egyptian lawyer defending Hussein, confirmed a bail hearing was now set for Thursday.

"It defies logic, human decency, and the rule of law that the government would go so far to proactively keep an innocent young kid - and victim of torture who has already been illegally detained without charge for nearly 790 days, and who is in desperate need of medical attention - behind bars," McMullen told Al Jazeera.

'A nation without torture' T-shirt

Hussein was arrested on January 25, 2014, with police accusing him of illegal protesting, getting paid to protest, possessing Molotov cocktails, and belonging to a "terrorist" organisation.

He was walking home from a peaceful demonstration to commemorate the third anniversary of the January 25, 2011 revolution that ousted long-time president Hosni Mubarak.

He was detained while wearing a protest scarf and a T-shirt that read: "A nation without torture" at the el-Marg checkpoint in Cairo.

Since his detention, Hussein faced near-automatic detention renewals, more than 20 of which were decided in his absence from the courtroom.

Amnesty International weighed in on the court's ruling on Tuesday.

"While the court's decision comes as a huge relief for Mahmoud Hussein and his family, it should not overshadow the outrageous injustice he has suffered," said Magdalena Mughrabi from the Middle East and North Africa Programme.

Follow Anealla Safdar on Twitter:  @anealla

Reports of deaths and negligence in Egypt's prisons

Source: Al Jazeera