An Egyptian court has slapped a Muslim Brotherhood leader with two years behind bars for “insulting the judiciary”, according to Egypt’s official MENA news agency.

Mohamed al-Beltagy, a leading member of Egypt’s banned Muslim Brotherhood group, was convicted Wednesday on charges of “insulting the judiciary” after he smiled "sarcastically" when judges stopped him from questioning former president Hosni Mubarak, who had been giving court testimony.

Under Egyptian law, Wednesday’s court ruling can still be appealed before a higher court within 60 days.

Al-Beltagy managed to ask Mubarak three questions before the court stopped him from asking any more.

Mubarak was in court to offer testimony at the ongoing retrial of his successor, Mohamed Morsi, who faces charges of participating in a mass jailbreak in 2011. 

Al-Beltagy has been convicted in three separate criminal cases (all of which he says are politically motivated), for which he is currently serving a total of 60 years behind bars.

Mohamed Morsi was elected president in 2012, one year after Mubarak stepped down after Egypt’s Jan. 25 popular uprising. 

After a single year in power, however, Morsi was himself ousted in a military coup and slapped with a host of questionable criminal charges. 

Following Morsi’s ouster in mid-2013, the Egyptian authorities launched a relentless crackdown on political dissent, killing hundreds of Morsi’s supporters and throwing thousands behind bars for alleged “acts of violence”.