Seven other juveniles were sentenced to five years in prison for inciting violence near the palace. All sentences were issued in absentia.
The defendants were accused of inciting violence, possessing weapons, protesting without permission, harming public and private building among other charges.
The incident took place in February, 2013 when clashes erupted between residents, some of them from the banned Muslim Brotherhood group and security forces.
Since Islamist ex-president Mohamed Morsi's ouster in 2013, the Egyptian government has been cracking down on the Muslim Brotherhood and its supporters.