A Cairo criminal court on Saturday sentenced to death 28 people over the 2015 killing of Egypt's top prosecutor and handed 15 others jail sentences of 25 years each.
The Cairo Criminal Court also handed down sentences ranging from 10 years to life in prison to 38 co-defendants in the same case. Sixteen of the accused were tried in absentia.
The court had in June recommended passing the death penalty to Egypt's top religious authority, the Grand Mufti, who can approve or reject the recommendation.
The sentences, confirmed by the court in Saturday's hearing after the Grand Mufti's approval, can be appealed.
Public prosecutor Hisham Barakat was killed in a car bomb attack on his convoy in Cairo, an operation for which Egypt blamed the Muslim Brotherhood and Gaza-based Hamas. Both groups have denied it.
Barakat was the most senior Egyptian figure to die in a spate of attacks that hit the country following the military's toppling in 2013 of democratically-elected President Mohammed Morsi, who hails from the now-outlawed Muslim Brotherhood.
The defendants were also charged with possessing explosives and conspiring with the Palestinian Hamas movement to carry out attacks in Egypt.
The death sentences are subject to an automatic appeal. Other verdicts can also be appealed by both defense and prosecution.
Last month, the court handed preliminary death sentences to 30 defendants in the case.
On Saturday, chief judge Hassan Farid said during a televised session that the charges were dropped against one defendant after he had died in prison.
In recent months, ties have improved between Egypt and Hamas after the latter had distanced itself from the Muslim Brotherhood.