CAIRO — A panel of judges appointed by Egypt’s ousted president, Hosni Mubarak, threw the nation’s troubled transition to democracy into grave doubt Thursday with rulings that dissolved the popularly elected Parliament and allowed the toppled government’s last prime minister to run for president, escalating a struggle by remnants of the old elite to block Islamists from coming to power.

The rulings by Egypt’s Supreme Constitutional Court were quickly condemned as a “coup” by Islamists, liberals and scholars. The court’s action, coming two days before a presidential runoff, set up a showdown with the Islamists who controlled Parliament. They said Thursday night that they refused to dissolve the legislature and vowed to win the presidency despite the signs of opposition within the government overseeing the vote.

The rulings recalled events that have played out across the region for decades, when secular elites have cracked down on Islamists poised for electoral gains, most famously when the dissolution of Algeria’s Islamist-led Parliament started a civil war 20 years ago.

Citing a misapplication of rules for independent candidates, the court sought to overturn the first democratically elected Parliament in more than six decades and the most significant accomplishment of the Egyptian revolt. Many analysts and activists said Thursday that they feared the decision was a step toward re-establishing a military-backed autocracy, though it was not yet clear whether the military leadership was willing to risk a new outbreak of unrest by suppressing the country’s most powerful political forces.