Egyptians pray at a protest Tuesday in Tahrir Square in Cairo. Egyptian lawmakers say the ruling military council has given them 48 hours to finalize the formation of a 100-member panel tasked to write the country's new constitution, or it will come up with its own blueprint for the body. (ASSOCIATED PRESS / Manu Brabo)

CAIRO (AP) — Hosni Mubarak’s health sharply deteriorated Wednesday, days after he was sentenced to life in prison, and specialists were evaluating whether to transfer him to a better-equipped hospital outside the penal system, security officials said.

The deposed leader’s health scare added to the uncertainty engulfing Egypt, where powerful political groups are seeking to bar Mubarak’s former prime minister from the presidential runoff and derail the election.

Officials at Cairo’s Torah prison said the 84-year-old Mubarak’s condition had moved to a “dangerous” phase and that doctors administered oxygen five times to help him breathe. He was also suffering from shock, high blood pressure and severe depression, according to the officials, who spoke on condition of anonymity because they were not authorized to speak to the media.

Mubarak was being treated in the prison hospital’s intensive care unit, which recently underwent a $1 million renovation to prepare for his arrival, the officials said. He was the only patient in the five-bed ICU ward.

Dr. Hamdi el-Sayyed, who has treated Mubarak over the last decade, said imprisonment in Torah was “inhumane” given his age and poor health.

It was not immediately possible to independently verify the gravity of Mubarak’s condition. But the ex-leader’s health has been an issue in recent years.

He was treated in 2010 for cancer of the gallbladder and pancreas, and his lawyer said after his arrest in April 2011 that it might have spread to his stomach. Officials denied the claim at the time.

Still, the ousted leader was ordered held in a military hospital after a government-appointed panel of physicians determined in May 2011 that he was too ill to be held in prison while awaiting trial, saying he suffered from heart trouble and had tumors in his pancreas removed. It did not say whether the tumors were malignant.

Mubarak did not want to go to Torah prison after he was sentenced on Saturday, pleading with his escort to take him back to the military hospital east of Cairo where he had stayed in a suite since his trial began in August. Before that, he was held in a hospital in the Red Sea resort of Sharm el-Sheikh.

Mubarak and his ex-security chief received life sentences for failing to stop the killing of protesters during last year’s uprising, but he and his two sons — one-time heir apparent Gamal and wealthy businessman Alaa — were acquitted of corruption charges. The sons are also being held in Torah, awaiting a separate trial on charges of insider trading.

Mubarak’s authoritarian regime was widely unpopular by the time of his overthrow, but conditions in Egypt have gone from bad to worse, with a wave of deadly protests, a battered economy and seemingly endless strikes.

Displeasure over the deteriorating conditions could be seen in the second-place finish by Mubarak’s former prime minister, Ahmed Shafiq, in the first round vote last month, ahead of more liberal candidates. Shafiq is to face the Muslim Brotherhood’s Mohammed Morsi in a runoff June 16-17.

However, in a new political twist, Egypt’s highest court said Wednesday that on June 14, two days before the vote, it would take up legal challenges to the legitimacy of both the presidential and recent parliamentary elections. Among other things, it will rule on the consitutionality of a now-suspended “isolation law” that would disqualify top officials of the Mubarak regime from the presidency.

If upheld, Shafiq could be barred from running, possibly forcing the cancellation of the runoff and a repeat of the first-round vote — something that is sure to plunge the nation into more turmoil.

Supreme Constitutional Court spokesman Maher Sami told The Associated Press he could not say whether a ruling would be reached on June 14, but added: “The court is responsive to public issues and that is why it is rapidly working to settle the case.”

Nullifying the election is likely to receive a mixed response, with those who see Shafiq as an extension of the old regime celebrating his disqualification. Morsi’s critics would also embrace such a ruling as a way to spare them an Islamist becoming president, a prospect that has alarmed liberals, leftists and minority Christians.

Combined, Shafiq and Morsi won about 50 percent of the vote, while liberal candidates more in tune with the revolution won 40 percent. A new election would be an attractive prospect for supporters of leftist Hamdeen Sabahi and moderate Islamist Abdel-Moneim Abolfotoh, who finished third and fourth respectively.

Egyptians living abroad have already cast their ballots in the runoff. Some of the estimated 100,000 who voted posted pictures of their ballots on social networking sites with the names of Morsi and Shafiq crossed out.

“The revolution continues,” some wrote, reflecting a widespread sentiment in Egypt that neither candidate is fit to rule Egypt.

On Wednesday, tens of thousands of protesters gathered in Cairo and elsewhere for a fifth successive day of demonstrations to call for Shafiq’s disqualification, a boycott of the vote or formation of a presidential council to run the country.

Many also protested the mixed verdict in the Mubarak trial, in which six top police commanders were acquitted of complicity in the killing of some 900 protesters during last year’s uprising.

The political uncertainty is deepened by the growing tension between the Brotherhood, which controls just under half the seats in the new parliament, and the generals, who gave the legislature until Thursday to agree on a selection process for a panel to draft a new constitution.

The action came after the Brotherhood had packed the panel with Islamists, who account for about 70 percent of all seats in the chamber. A court order disbanded that panel and efforts to form a new one have been deadlocked.

“There is a struggle within the Brotherhood. ... One strong faction says the office of the president is worth big sacrifices,” said Tharwat El-Khirbawy, a former Brotherhood member.

Further complicating the political scene, the Supreme Constitutional Court will also consider on June 14 a ruling by a lower court against a law that regulated recent parliamentary elections. If the ruling is upheld, the elections would be declared illegal and parliament would be dissolved.