CAIRO (AP) -- Nearly a year and a half after the ouster of autocratic leader Hosni Mubarak, millions of Egyptians lined up for hours outside polling stations Wednesday to freely choose a president for the first time in an election that pits old regime figures promising stability against ascending Islamists seeking to consolidate power.
The two-day vote will bring down the final curtain on decades of authoritarian rule, although concerns remained that the nation's military rulers who took over after Mubarak would try to retain influence.
Egyptians were hopeful as they waited patiently for their chance to cast a ballot in an unprecedentedly open race, with some 50 million eligible voters.
For most of his 29-year rule, Mubarak - like his predecessors - ran unopposed in yes-or-no referendums. Rampant fraud guaranteed ruling party victories in parliamentary elections. Even when, in 2005, Mubarak let challengers oppose him in elections, he ended up not only trouncing his liberal rival but jailing him.
"I can die in a matter of months, so I came for my children, so they can live," a tearful Medhat Ibrahim, 58, who suffers from cancer, said as he waited to vote in a poor district south of Cairo. "We want to live better, like human beings."
The generals who assumed control after the revolution have promised to hand over power by July 1, ending a turbulent transition period defined by deadly street clashes, a faltering economy, a surge of crime and human rights abuses.
"It's a miracle," said Selwa Abdel-Malik, a 60-year-old Christian from the Mediterranean port city of Alexandria as she was about to vote. "And it's a beautiful feeling too."
Thirteen candidates were contesting the election, with four front-runners either from Mubarak's regime or from its traditional opponent, the fundamentalist Muslim Brotherhood. No outright winner is expected to emerge, so a runoff between the two top finishers will be held June 16-17. The winner will be announced on June 21.
An Islamist victory will likely mean a greater emphasis on religion in government. The Muslim Brotherhood, which already dominates parliament, says it won't mimic Saudi Arabia and force women to wear veils or implement harsh punishments like amputations. But it says it does want to implement a more moderate version of Islamic law, which liberals fear will mean limitations on many rights.
The main Islamist contenders were Mohammed Morsi of the powerful Brotherhood and Abdel-Moneim Abolfotoh, a moderate Islamist whose inclusive platform has won him the support of some liberals, leftists and minority Christians.
The two secular front-runners, former prime minister Ahmed Shafiq and former foreign minister Amr Moussa, both are veterans of Mubarak's regime and their opponents fear they will do little to change Mubarak's autocratic system.
Many candidates have called for amendments in Egypt's 1979 peace treaty with Israel, which remains deeply unpopular. None is likely to dump it, but a victory by any of the Islamist or leftist candidates in the race could mean strained ties with Israel and a stronger stance in support of the Palestinians in the peace process. Shafiq and Moussa, and ironically the Brotherhood, are most likely to maintain the alliance with Washington.
Egypt's next president will be the nation's fifth since the monarchy was toppled following a 1952 coup that ushered in six decades of de facto military rule. Like his three predecessors - Anwar Sadat, Gamal Abdel-Nasser and Mohammed Naguib - Mubarak has a military background.
The military has said it has no intention to cling on to power, but it is not clear what authority it wants to retain after the election of a new president. The generals have said they have no preferred candidate, but they are widely thought to be favoring Shafiq, a former air force commander and Mubarak's last prime minister who has steadily gained in opinion polls over the past week.
Ironically, the closest thing to a "revolutionary candidate" -- rights lawyer Khaled Ali -- has virtually no chance of winning, robbing the youth groups behind the anti-Mubarak uprising of a say in how Egypt is run.
"We will have an elected president but the military is still here and the old regime is not dismantled," said Ahmed Maher, a prominent activist from the group April 6, a key architect of the uprising.
"But the pressure will continue. We won't sleep. People have finally woken up. Whoever the next president is, we won't leave him alone," he said outside a polling center in Cairo.
The election comes less than two weeks before Mubarak, 84, is due to be sentenced after he was tried on charges of complicity in the killing of some 900 protesters during the uprising against his rule. He also faced corruption charges, along with his two sons, one-time heir apparent Gamal and wealthy businessman Alaa.
Whoever wins will have to tackle a host of formidable problems, ranging from economic, a tenuous security and soaring unemployment. The next president will serve a four-year term.
"May God help the new president," said Zaki Mohammed, a teacher in his 40s as he waited to vote in a district close to the Giza Pyramids. "There will be 82 million pair of eyes watching him."
Another voter in line, tour agent Salah Ali, said: "We need someone who works more than he talks."