Ahdaf Soueif, a novelist and Mr. Abd El Fattah’s aunt, called the court’s decision “a travesty of justice” that, though it was expected, still “takes your breath away.” Mr. Abd El Fattah’s lawyers said they would appeal.

The verdict came a day after President Abdel Fattah el-Sisi, the former general who led the military takeover in 2013, promised in a televised speech to address the problem of what he called “innocent youth who may have been wrongfully imprisoned” in Egyptian jails during the crackdown. Mr. Sisi said he would seek to release some of them. But his government has shown no intention of curbing the sweeping restrictions on public protests that were applied in this case.

A number of young leaders of the 2011 uprising against President Hosni Mubarak have been jailed since July 2, 2013, when the military took over. But Mr. Abd El Fattah has special prominence for Egypt’s left-leaning, non-Islamist opposition. He pioneered a movement by young activists to capitalize on the freedom of the Internet to speak out against Mr. Mubarak’s authoritarianism, and he has been a thorn in the side of each successive government since then.

The Mubarak government jailed him for 45 days for participating in a 2006 demonstration for judicial independence. The military council that took power from Mr. Mubarak jailed Mr. Abd El Fattah for a time in 2011. After Mohamed Morsi of the Muslim Brotherhood was elected president in 2012, his government called Mr. Abd El Fattah in for questioning and raised the prospect of another detention. And most recently, the current government jailed him for his role in the demonstration against military trials, which was held outside a legislative building and was quickly dispersed with tear gas and water cannons.