Prosecutors will investigate allegations that Egypt’s ousted president escaped from prison during the 2011 revolution with help from the Palestinian militant group Hamas, officials said.

Chief prosecutor Hesham Barakat has received testimonies from a court in the Suez Canal city of Ismailia that will be the base for an investigation by state security prosecutors into the jailbreak by Mohamed Morsy and more than 30 other Muslim Brotherhood leaders, according to the officials who spoke on condition of anonymity because they were not authorized to speak to the media.

The question of whether Hamas helped them escape amid the chaos surrounding the 2011 uprising that toppled Hosni Mubarak has been debated in the media for months and proved a political headache for Mr. Morsy during his one-year rule as Egypt’s first freely elected president. Critics in the opposition and judiciary have suggested that proof of foreign intervention on Egyptian soil could lead to treason charges.

The issue has taken on more significance since Mr. Morsy was ousted on July 3 by the military following a wave of protests in which millions of Egyptians called on him to step down. The toppled Islamist leader has been kept at an undisclosed Defence Ministry facility and no charges against him have been announced.

Hamas has denied any role in the January 29, 2011, jailbreak at Wadi el-Natroun prison northwest of Cairo. Mr. Morsy and other Brotherhood leaders have said local residents helped them escape after most inmates left the Wadi el-Natroun prison northwest of Cairo.

The investigation by the state security prosecutors will be rooted in a court case against a former inmate, but Judge Khaled Mahgoub turned what was in effect a low-profile trial into a public inquiry into the escape by Mr. Morsy and the other Brotherhood officials. A series of prison officials, police and intelligence agents testified before the country, some behind closed doors.

At the end, Mr. Mahgoub in his June 23 ruling referred the testimonies he collected to the chief prosecutor’s office with a request that he investigates the matter further.

In part at least, the trial in Ismailia, which made front page news for months, fitted into a picture of strained relations between Mr. Morsy and the judiciary after what many judges saw as his encroachment on the independence of the judiciary.

More In: World | International | News