The sentence against Alaa Abdel-Fattah is by far the toughest against any of the liberal, pro-democracy activists behind the 18-day uprising that toppled Hosni Mubarak's 29-year regime.
It is also the first conviction of a prominent activist since former army chief Abdel-Fattah el-Sissi took office as president on Sunday.
In the 11 months since el-Sissi ousted the country's first freely elected president, the Muslim Brotherhood's Mohammed Morsi, authorities have launched a massive crackdown on Islamists, detaining at least 16,000 and killing hundreds.