CAIRO — Egyptians on Saturday voted to choose between a conservative Islamist and Hosni Mubarak’s former prime minister in a presidential runoff once billed as the country’s long-awaited shift to democracy but now clouded by pessimism over the future.

Whoever wins after two days of voting, Egypt’s military rulers will remain ultimately at the helm, a sign of how Egypt’s revolution has gone astray 16 months after millions forced the authoritarian Mubarak to step down in the name of freedom.

“We are forced to make this choice. We hate them both,” said Sayed Zeinhom in Cairo. Mahmoud el-Fiqi, waiting with him at a polling center, offered, “Egypt is confused.”

The race between Ahmed Shafiq, a career air force officer, and the Muslim Brotherhood’s Mohammed Morsi, a U.S.-trained engineer, has deeply divided the country after the stunning uprising that ousted Mubarak after 29 years in office, and left many disillusioned about the elections’ legitimacy.

Many voters felt that the choice no longer even mattered after a court ruling last week effectively ensured that the military generals who have ruled since Mubarak’s ouster will continue to be in power.

The generals took over legislative powers after Egypt’s highest court Thursday ordered the dissolution of the parliament elected just six months ago, and the military made a de facto declaration of martial law, despite earlier promises to hand over power to the new president by July 1. With no constitution or parliament, the president’s powers are likely to be determined by a military with power to arrest civilians for crimes as minor as traffic obstruction.

To the activists behind the 18 days of mass protests that toppled Mubarak’s regime, the election seemed a cruel joke that crushed their dream of a new Egypt — free, democratic and rid of all traces of the old system.

“The revolution will continue and restore the right of those who died in the uprising,” said Ziad el-Oleimi, an iconic figure of the anti-Mubarak revolt in which nearly 900 protesters were killed. “This election is essentially for the selection of a new dictator.”

There were no official turnout figures, and in districts known to be strongholds for both candidates, voters came out in force and braved long waits and heat.