CAIRO — Voters cast ballots on Saturday for the first competitively elected leader in Egypt’s history, even as a last-minute grab for power by its ruling generals raised questions about whether the election would be a milestone in the transition to democracy or a facade obscuring the re-emergence of the old order.

Voters faced a stark choice between two faces of the past: Ahmed Shafik, a former air force general and stalwart of former President Hosni Mubarak who promised to restore order and thwart the rise of an Islamist theocracy, or Mohamed Morsi, a veteran of the once-outlawed Muslim Brotherhood campaigning as a defender of the revolution against a return of the Mubarak-era autocracy.

The ruling military council that took power after Mr. Mubarak’s ouster 16 months ago had pledged that this weekend’s two-day presidential runoff would be the final step in the transition to civilian government before the generals were to cede power.

The day before the vote, however, they dissolved the democratically elected, Islamist-led Parliament that had been the chief accomplishment of the revolt so far. Acting on a rushed ruling by a court of Mubarak-appointed judges, they declared they would be the sole lawmakers, even after a new president is elected. And they began drawing up a new interim constitution that would define the power of the president whom voters were choosing on Saturday.