Ahmed Shafiq was prime minister during the mass protests which ousted President Hosni Mubarak
Egypt's election commission has reinstated former Prime Minister Ahmed Shafiq as a candidate in the country's forthcoming presidential election.
The commission had barred Mr Shafiq on Tuesday under a law that prevents senior officials from the era of President Hosni Mubarak from standing.
However, on Wednesday the commission upheld Mr Shafiq's appeal.
Mr Shafiq was the last prime minister to serve under Mr Mubarak, who was ousted by protests in February 2011.
"The decision to accept my client's appeal proves that the electoral committee functions as an independent body according to the rule of law," Shafiq's lawyer, Shawqi Sayyid, said, according to Reuters. New front-runners
The law under which Mr Shafiq was originally disqualified bars from the presidency anyone who served in senior positions in government and the former ruling National Democratic Party under President Mubarak.
The law had been rushed through the Islamist-dominated parliament and ratified by the ruling Supreme Council of the Armed Forces (Scaf) on Tuesday.
However, in his appeal Mr Shafiq challenged the measure's constitutionality and the commission has now referred the law to Egypt's Supreme Constitutional Court.
The commission is due to announce the final list of candidates on Thursday.
Mr Mubarak's former vice-president and spy chief, Omar Suleiman, has also been disqualified for different reasons, along with two Islamists - Khairat al-Shater of the Muslim Brotherhood and Salafist Hazem Abu Ismail.
The front-runners among those left in the race are considered to be former Foreign Minister Amr Moussa, the independent moderate Islamist Abdel Moneim Aboul Fotouh and Mohammed Mursi, the chairman of the Muslim Brotherhood's Freedom and Justice Party (FJP).
The first round of voting is scheduled on 23 and 24 May, after which there is expected to be a run-off between the top two candidates in June.
The ruling Scaf, which assumed presidential powers after Hosni Mubarak was overthrown, is due to hand over to the new president on 1 July.