Cairo: An altercation erupted on Tuesday between ousted president Mohammad Mursi and the judge presiding over the Islamist leader’s trial related to allege spying for Qatar.

The spat started when Mursi failed to answer chief judge Mohammad Fahmi’s repeated call for him to confirm his attendance at the start of the trial, witnesses said.

Mursi appeared busy cleaning his seat inside a defendants’ cage at a makeshift courtroom in the Police Academy on the outskirts of the Egyptian capital, the witnesses added.

When Fahmi repeated his call for Mursi, the latter eventually yelled at the judge, saying: “I always reply to you.”

“Why do you speak like this? You should talk in a better way,” an exasperated judge commented, according to the witnesses.

“I raise my voice so that you can hear me,” said Mursi.

“Is this a good way of talking? You should talk in a better way,” said the judge, before starting the 23rd session of the trial, one of several trials involving the former president.

Mursi is being tried on charges of leaking sensitive state documents to his ally, Qatar, when he was in power. He is also charged with jeopardising national security and harming national interests in the same case. He could face death if convicted.

Mursi’s appearance in Tuesday’s hearing was his first since another court gave him on Saturday a preliminary death sentence on charges of a prison escape during the 2011 uprising against his predecessor Hosni Mubarak.

The sentence has been referred to the country’s chief Islamic authority, the Grand Mufti, to approve or reject it. This reference is mandatory under Egyptian law in death penalty cases.

The final verdict is set for June 2.

In 2013, the army toppled Mursi, a senior leader of the Muslim Brotherhood, following enormous street protests against his one-year rule. He is serving a 20-year jail term after he was convicted of involvement in arresting and torturing opponents when he was in office.

Mursi also faces a separate trial for insulting the judiciary.

He has repeatedly dismissed his trials as politically motivated, refusing to recognise the jurisprudence of courts.

Mursi’s Muslim Brotherhood has been the target of a relentless security clampdown since his overthrow.