An Egyptian court has sentenced 23 pro-democracy activists to three years in jail for holding an illegal protest, despite international calls to free them.

The defendants were sentenced on Sunday for their part in a peaceful demonstration in June near the presidential palace in Cairo, which called for the annulment of a new anti-protest law that severely restricted the right to demonstrate.

They were arrested while protesting the detention of Alaa Abdel Fattah, a political blogger, and other activists held in jail.

Some of the activists sentenced on Sunday had supported the army's overthrow of president Mohamed Morsi in 2013.

Two of those jailed were Yara Sallam and Sanaa Seif, described by Amnesty International as "prisoners of conscience".

"The ruling is political, it has no legal grounding," alleged Ahmed Ezzat, one of the defence lawyers.

The three-year sentence is the maximum allowed under the law.

The court also found the activists guilty of blocking a road during the protest, among other charges, and fined them about $1,390.

Egypt's anti-protest law, which came into effect in November 2013, requires organisers to seek several separate permissions to hold a demonstration.

Along with a decree allowing the endless extension of pre-trial custody, it has contributed to more than 41,000 people being arrested.

Source: Agencies