After six decades under authoritarian, military-backed rule, Egypt's 50 million voters can decide whether to entrust the most populous Arab nation to an Islamist president for the next four years, as well as the Islamist-led assembly they chose earlier.
Some voters voice disappointment with the performance of parliament, where the Muslim Brotherhood's party has the biggest bloc. The assembly has been unable to assert itself over the government appointed by the generals who took over from Mubarak.
Alarmed by rising crime, disorder and a failing economy, some Egyptians favour a man with government or military experience, even if he harks back to the Mubarak era.
Queues built up outside some polling stations in the baking sun, with many voters determined not to miss their chance to influence the first round. The government declared Thursday a public holiday to allow state employees to cast their vote.
If no one wins more than half the votes needed for outright victory, the top two will contest a run-off on June 16 and 17. First-round results may be clear by Saturday, but an official announcement is not due until Tuesday.
"I came yesterday and found it very crowded so I came today," said Khaled Abdou, a 25-year-old engineer voting in Cairo. "I must participate in choosing the president and I hope this leads to stability and the change needed."
Voting passed off calmly on Wednesday, apart from a stone-throwing attack on Shafiq, 70, a former air force chief.
Other leading candidates are the Brotherhood's Mohamed Mursi, 60, independent Islamist Abdel Moneim Abol Fotouh, 60, Moussa, 75, who also served as Mubarak's foreign minister in the 1990s, and leftist Hamdeen Sabahy, 57.
According to election consultant Ossama Kamel, fewer abuses have occurred in this vote than in the parliamentary poll that ended in January, partly because of lessons learned then.
He predicted a last-minute rush to the polls on Thursday, with voting time extended, perhaps for several hours.
"We have seen a lot better control of campaigning on election day than during the parliamentary vote when there were lots of violations, with candidates and their supporters hustling people outside polling stations," he told Reuters.
The vote marks a crucial stage in a turbulent army-led transition racked by protests, violence and political disputes. The generals who took charge when Mubarak was ousted on Feb. 11, 2011, have pledged to hand over to the new president by July 1.
Even then the army, whose grip reaches deep into government and the economy, is likely to wield influence for years to come. A tussle over who should write the constitution also means the new president will not know his own powers when he is elected.
Independent lawmaker Amr el-Shobaki says the president's election marks the start, not the end, of Egypt's transition.
"Fifteen months in the life of this nation were wasted in anarchy, randomness and unprecedented poor performance that means it is still searching for a way into the interim period," he wrote in Al Masry Al Youm newspaper.
With no reliable opinion polls, the presidential race is wide open, a pleasant change for Egyptians accustomed to the routinely forged votes of Mubarak's 30 years in power.
The Muslim Brotherhood said Mursi was ahead after the first day of voting. Moussa's campaign also put Mursi in the lead with its candidate second. Their estimates could not be confirmed.
"This is the first time we can really choose our president and no one will mess with the result," said Ahmed Shaltout, a 36-year-old lawyer who said he would vote for Mursi.
Explaining why he favoured Moussa, Mohamed Salem, a shopkeeper near the Pyramids, said: "I want security and prosperity like before. We in the tourism sector were the most hurt. We could not count the number of tourists coming into our shops every day. Now we hardly need our fingers to count them."
Egyptians appear divided, even within families, between those willing to give Islamists a chance to rule this deeply conservative country and those who put security first.
"Security is the most important thing of course. If there is security we will have work, money and an economy. If there is no security no tourists will come. That's the first thing," said Sayed Mohamed, 33, a company manager, who supports Shafiq.
The next president will face huge tasks in reviving Egypt's wilting economy and restoring security. The sprawling police force, which virtually collapsed during the anti-Mubarak revolt, is only a shadow of its once-feared presence.
Security is Shafiq's strongest card. A former aviation minister, he was appointed prime minister days before Mubarak fell and quit soon afterwards in response to popular protests.
But his links with the Mubarak era may tell against him.
When he voted in Cairo, protesters hurled shoes and stones at him, crying: "The coward is here, down with military rule."
Even with 12 candidates to choose from, many Egyptians seem unconvinced by any of them, resolving to vote for the least bad.
"None of them is good enough to be president but Mursi is the best of the worst," said Sherif Abdelaziz, a 30-year-old voter in the capital's slum district of Manshiet Nasr.
"There are lots of poor people, not just me. Many people live amid this rubbish. We need to give them justice, bread, access to hospitals," he said. "If you have money in Egypt, you can go to any hospital and live, if you don't, you die."
He disparaged Shafiq and Moussa as "feloul", or remnants from the Mubarak era, and said that if either was elected president a new revolution would kick off in Tahrir Square.
Mubarak, 84, is contemplating the spectacle of a free election from the upscale Cairo hospital where he is confined while on trial for ordering the killing of protesters and for corruption. A verdict is due on June 2, two weeks before any presidential run-off. A death sentence is possible but unlikely.