Egypt is to resume its first free presidential election after voting passed off mostly calmly on the first day apart from a stone-throwing attack on candidate Ahmed Shafiq.
The race broadly pits Islamist candidates against secular ones like Shafiq and Amr Moussa, the former Arab League chief who previously served as former premier Mubarak's foreign minister.
Long queues formed at polling stations early on Wednesday (local time), and some were packed late into the evening.
But turnout, so far, seemed lower than an earlier parliamentary vote when Islamists swept up most seats. The scorching sun deterred some.
"I'll vote on Thursday to avoid the crowds. I'm backing Amr Moussa. He knows the country and has the experience. I chose the Muslim Brotherhood's party in the parliamentary election but we didn't get anything from them," said 57-year-old Fouad Mahmoud.
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 February 11, 2011, have pledged to hand over to the new president by July 1.
Even then, the army, with its privileges and vast business interests, is expected 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.
Whoever wins faces daunting tasks of mending a broken economy and re-establishing security, both big public concerns.
The Muslim Brotherhood said its candidate, Mohamed Mursi, was ahead after Wednesday's voting.
Moussa's campaign office also put Mursi in the lead with the former League chief second.
Voters revelled in their new ability to influence a genuinely contested election after decades of rigged votes under Mubarak, a military man like all Egypt's previous presidents.
"This is the first time that I vote in my entire life. I didn't take part in past elections because we knew who would be president. This is the first time we don't know," said Mohamed Mustafa, a 52-year-old engineer in Cairo's Zamalek district.
If, as expected, no one gets more than 50 percent of the vote, a second round between the top two candidates will be held on June 16 and 17.
First-round results may be clear by Saturday, but an official announcement is not due until Tuesday.
After a campaign that gave Egyptians their first US-style presidential TV debate, some voters found themselves waiting with candidates who made a point of not pushing to the front.
Independent Islamist Abdel Moneim Abol Fotouh, 60, was clapped on joining a Cairo queue.
Mursi, 60, said after voting in the Nile Delta city of Zagazig that Egyptians would not accept anyone from Mubarak's "corrupt former regime".
When Shafiq, 70, arrived to vote in Cairo, protesters hurled shoes and stones at him.
"The coward is here. The criminal is here," they cried.
"Down with military rule."
Like Mubarak, Shafiq commanded the air force before joining the cabinet.
The former prime minister, who was appointed days before Mubarak fell and who quit soon afterwards amid protests against him in Tahrir Square, is one of the most divisive candidates.
He appeals to those who want a strongman to restore order, but others see him as embodying everything they wanted changed.
Moussa, 75, left Mubarak's cabinet a decade before the uprising. At the Arab League, he built on his popularity with criticism of Israel and US policy in the region.
Yet some still brand him a remnant of the old order.
For many of those who cannot stomach Islamists or Mubarak-era ministers, the favourite is leftist Hamdeen Sabahy, 57.
Independent monitors noted minor infringements in Wednesday's voting, such as campaigning outside polling stations, but said they did not undermine its validity.
Mubarak, 84, is on trial for ordering the killing of protesters and for corruption. A verdict is due on June 2.