20 men will end up in the gallows for killing policemen during an uprising that led to the removal of former Egyptian President, Mohammed Morsi in 2013.

The Egyptian court on Sunday upheld the death penalty for the 20 men while changing the sentence for many others to hefty prison terms.

The verdicts which had been appealed before can again be appealed.

The case involves 156 people on trial and is known as the "Kerdasa incident" in reference to the pro-Muslim Brotherhood neighbourhood where the violence took place in the Giza province adjacent to Cairo.

On August 14, 2013, Islamist gunmen fired rocket propelled grenades at a police station in Kerdasa and slit a policeman's throat before burning the building down, hours after security forces violently dispersed two protest camps, killing hundreds.

"The crimes the defendants are accused of were committed by a group charged with carrying them out," said Judge Sherine Fahmy before reading out the verdict.

"Some committed murder themselves, others stole, or burned, some guarded the road so the assailants could commit their crimes, and some blocked the roads to prevent help from coming, some incited citizens against the military and police using mosque speakers and microphones on the streets. If it were not for all of that, these crimes would not have been committed," the judge added.