An appeals court in Cairo has overturned the conviction of four Egyptian policemen over the deaths of 37 detainees last August.
The deputy chief of Heliopolis police station Lt Col Amr Farouk was given 10 years in March for involuntary manslaughter and extreme negligence.
The other three officers were given one-year suspended sentences.
The detainees were asphyxiated when tear gas was fired into the back of a vehicle taking them to prison.
Security officials initially said the detainees, allegedly Islamist supporters of ousted President Mohammed Morsi, had rioted and captured a guard while en route to Abu Zabal prison on 18 August.
Officers said they were forced to respond by firing tear gas into the vehicle carrying 45 detainees.
Crowd-control experts said at the time that the detainees would have died in agony, gasping for air and incapable of resisting the guards.
On Saturday, the Appeals court ordered the case to be transferred to the general prosecution for further investigation.
The decision "means that the case is back to square one", human rights lawyer Amr Imam told AFP news agency.
The deaths sparked international condemnation, with UN Secretary General Ban Ki-moon saying he was "deeply disturbed" by the events.
They took place four days after almost 1,000 people were killed when security forces cleared two sit-ins in Cairo by supporters of President Mohammed Morsi, who was ousted by the military in July.
Thousands of Islamists have since been detained, among them Mr Morsi and other senior leaders of the Muslim Brotherhood movement, who are being tried on a variety of charges including inciting murder and conspiring with foreign organisations to spread chaos throughout Egypt.