Registration for candidacy in Egypt's first post-uprising presidential election closed on Sunday, amid last-minute twists and turns that have shaken the political race.
Around 20 people have registered so far, each hoping to lead the Arab world's most populous nation through a fragile transition following an uprising that toppled long-time president Hosni Mubarak last year.
The candidates include former Arab League chief Amr Mussa, ultra-conservative Islamist preacher Hazem Abu Ismail, the Muslim Brotherhood's Khairat El-Shater, former Brotherhood member Abdel Moneim Abul Fotouh and Mubarak's last prime minister, Ahmed Shafiq.
Former intelligence chief Omar Suleiman, a stalwart of the Mubarak regime and seen as close to the ruling military, registered less than half an hour before the 2:00 pm (1200 GMT) deadline.
Military and riot police lined the entrance to the election commission headquarters in a Cairo suburb amid fears of possible clashes between supporters and foes of the presidential hopefuls.
The Supreme Council of the Armed Forces, which took power when Mubarak was ousted, has said it will hand power to civilian rule in June after a president is elected.
The candidates reflect several political trends including that of the Islamists, who have gained power and prominence since the uprising, but the process has also given a renewed voice to members of the former regime.
Immediately after the uprising, anyone associated with Mubarak kept a low profile for fear of reprisals but after a year of political upheaval and insecurity, some are no longer shy about their support for ex-regime members.
"He will bring back stability and restore our dignity," said a Suleiman fan, holding a poster of the ex-general.
"The people want Omar Suleiman," his supporters chanted as he struggled to get through the crowds outside the election commission.
Mubarak's last prime minister, Ahmed Shafiq, as well as a former intelligence officer and a former state security officer are also competing in the race.
Signup to our newsletter and follow us on Facebook and Twitter!
Several other candidates scrambled to register at the 11th hour including labour lawyer Khaled Ali and Abdallah al-Ashaal of the Salafist Al-Asala party.
The only woman to announce a bid, Bothaina Kamel, failed to gather the required 30,000 voter signatures to qualify but she told reporters she would "continue to work to develop the political conscience of the Egyptian people."
The registration process alone has been filled with drama, becoming the butt of jokes likening it to a soap opera.
Abu Ismail, known for his fervent anti-US rhetoric, was found to have a mother who held an American passport, potentially disqualifying him from the race.
The presidential election law states that all candidates must be born to Egyptian parents who have never held citizenship of another nation.
And the powerful Muslim Brotherhood, which had repeatedly vowed not to field a candidate and expelled Abul Fotouh from the movement for choosing to run, made a dramatic U-turn and put forward Shater, only to find out later that he too may be disqualified.
Politician Ayman Nur, whose unprecedented challenge to Mubarak in 2005 earned him worldwide recognition, was pardoned last week of a conviction for fraud, allowing him to run for the top job.
But on Saturday he was told that under the law he could only stand for the presidency six years after his pardon.
If Shater is banned under the same rule as Nur -- he was freed from prison in March 2011 -- the Muslim Brotherhood may instead field Mohammed Mursi, another candidate who has registered and is waiting in the wings just in case.
After news that Abu Ismail was probably out of the race, the ultra-conservative Gamaa Islamiya said they would field a candidate, Safwat Hegazy, but changed their mind at the very last minute.
The election commission is due to examine candidacies and look into any legal issues between April 13-15 before issuing a final list of approved candidates. Those rejected will have 48 hours to appeal.
The first round of the election is due to take place on May 23 and 24.