ALEXANDRIA, Egypt -- An Egyptian judge on Saturday released from jail two policemen who were convicted of beating a young man to death in a killing that helped inspire the country's 2011 uprising.

The move came after an appeals court earlier threw out the policemen's conviction and ordered a retrial.

The judge in an Alexandria court on Saturday ruled that the two be released during the retrial after their lawyers successfully argued they had spent more than 36 months in pre-trial detention after the conviction was overturned. The next hearing in the case is expected in early July.

The legal proceedings, however, were a far cry from the magnitude the case has had in Egypt's recent history.

The death of 28-year-old Khaled Said in Alexandria in June 2010 ignited public outrage after photographs of his severely beaten face were posted on the Internet and became a rallying cry against rampant police brutality under former President Hosni Mubarak.

A Facebook page in his honour called "We are all Khaled Said" was used to call for the protests that drew millions to the streets in Egypt's Arab Spring uprising that toppled Mubarak on Feb. 11, 2011.

But the circumstances behind Said's killing remained unclear. Witnesses said two plainclothes officers dragged him from an Internet cafe and beat him to death on the street. The reason he was confronted by police has never been fully explained.

Security forces and forensics reports initially maintained Said suffocated by swallowing a packet of drugs when he was approached - a claim met with derision after the photos were circulated showing his body covered with bruises, his teeth broken and jaw smashed.

In October 2011, a court convicted policemen Mahmoud Salah and Awad Ismail Suleiman of manslaughter in Said's case. They were given seven years in prison each.

The sentencing drew the ire of both pro-reform activists and the defendants' families.

Both the attorney general's office and the defendants' lawyers appealed the verdict, with neither side satisfied with the outcome of the initial trial. An appeal was later granted, and the conviction overturned.

As the decision to release the policemen from prison reached activists outside the courthouse in the Mediterranean coastal city, chants broke out against the police and Mubarak's successor, President Mohammed Morsi.

Said's mother, Laila Marzouk, told The Associated Press she feels her son died in vain.

"The rights of all the martyrs have been lost under the Muslim Brotherhood rule," she said, referring to the group from which Morsi hails.

The Brotherhood has continuously denied it is running the presidency from behind the scenes.

Marzouk said she was threatened with a knife by supporters of the policemen while in the courtroom on Saturday. But the head of security in Alexandria, Amin Ezzedine, dismissed her claims and said the courtroom was secured with electronic scanners outside.

Said's mother also said she had to some extent expected Saturday's decision, after another court earlier in the year ordered Mubarak released from prison following a ruling to overturn his conviction for failing to stop the killing of around 900 protesters during the bloodiest days of the uprising.

Mubarak's lawyers successfully appealed his conviction in January and a new trial of the former president is underway. Mubarak remains in prison pending investigations into allegations of corruption.