CAIRO — It was difficult not to read the courtroom scene Tuesday as political metaphor, or perhaps as political theater: Mohamed Morsi, Egypt's ousted Islamist president, pacing and shouting ineffectually in a glassed-in and largely soundproofed defendant's cage.

Morsi, the country's first democratically elected president, made his second court appearance since being deposed by the army in July. This time he was appearing on charges of orchestrating a prison break in 2011 amid the chaos of the revolution that toppled longtime autocrat Hosni Mubarak.

The latest incarnation of Morsi's legal woes came against a backdrop of increasing turmoil. Hours before the start of the trial, drive-by gunmen assassinated a senior official of the Interior Ministry, which oversees the police. Mohamed Saeed, the slain official, was a top deputy to Interior Minister Mohamed Ibrahim, who survived an attack by a suicide bomber four months ago.

Many Egyptians have been seeking stability after three years of turmoil. Army chief Abdel Fattah Sisi, who in effect runs the country, is expected to soon announce his candidacy for president, after an endorsement from top generals Monday. Sisi's rank was also upgraded from general to field marshal.

Despite a wide-ranging crackdown on Morsi's Muslim Brotherhood and other government opponents, stability has been in short supply, with trouble flaring anew in the restive Sinai Peninsula. State media reported Tuesday that suspected Islamic insurgents late Monday had blown up a pipeline that carries gas to Jordan. It was the third such attack in a month. Over the weekend, a militant group said it had downed a military helicopter with a surface-to-air missile, a claim backed by a video that security officials said seemed credible.

Keeping track of Morsi's many legal rendezvous is becoming somewhat cumbersome. The former president faces no less than four court proceedings. A number of the charges against him carry the death penalty.

Tuesday's session, lasting much of the day, was the most substantive against Morsi since his ouster.

His first court appearance, in November, dissolved into pandemonium within moments as the ex-leader and his fellow defendants shouted down the judge, declaring that they did not recognize the legitimacy of the court. His second scheduled appearance was canceled by authorities early this month, when they claimed the weather was too bad to fly him from his high-security prison to the court venue.

Authorities had initially promised a live broadcast of the trial; instead, snippets were shown after the fact on state television.

In his November court appearance, Morsi, clad in a business suit, shouted at the judge for everyone to hear. In the second, he was clad in the white prison garb mandated by authorities, and restrained behind the glass surrounding his metal cage, and video shown on state television lingered on his ineffectual rage behind the barrier.

Nearly all senior leaders of the Muslim Brotherhood are behind bars, with thousands of members jailed as well. Nearly 1,000 followers were killed in confrontations with security forces in mid-August.

The Brotherhood says it does not recognize the legal case against Morsi, and insists that he is still president.

At one point in Tuesday's proceedings, in an exchange that was audible when broadcast later on state television, Morsi shouted at the judge: "Who are you?" The jurist responded, with some equanimity: "I am the head of the Cairo criminal court."

The case was adjourned until Feb. 22.

laura.king@latimes.com

Twitter: @laurakingLAT

Special correspondent Amro Hassan contributed to this report.