Egypt's highest constitutional court will decide whether to disqualify one of two candidates in this weekend's presidential runoff because of the so-called "political isolation" law, which bars ex-Mubarak officials from running for public office.
Hundreds of police and troops backed by armored vehicles set up a security ring around Egypt's Supreme Constitutional Court ahead of the ruling on Thursday.
The court will decide on the validity of the law passed by the Islamist-led parliament that sought to bar Ahmed Shafiq, former president Hosni Mubarak's last prime minister, from the vote pitting him against the Muslim Brotherhood's candidate, Mohamed Morsi.
It will also rule on whether parliament is unconstitutional; a lower court found that some provisions of the electoral law, allowing political parties to compete with independent candidates for some seats, might have violated the constitution.
Live Box 20111120475439857
A judicial body has already recommended that both laws be overturned, allowing Shafiq to continue his bid and possibly dissolving the parliament.
The court is not bound to follow that advice, but it is a likely indication of the ruling.
Seeking to derail presidential bids by senior Mubarak-era officials, parliament approved the law on April 12 to strip political rights from anyone who served in top government or ruling party posts in the last decade of Mubarak's rule.
That law initially prompted the election committee to disqualify Shafiq. But he was let back into the race on appeal and pending the constitutional court ruling.
Legal experts say they expect Shafiq will be allowed to run. The court could avoid a verdict saying the election committee was not the competent authority to refer the case, but the experts thought that unlikely.
Elections 'on time'
"We will request that the court issues its ruling tomorrow to end this controversy and allow Egypt a sense of political stability," Shafiq's lawyer Shawky el-Sayyed told the Reuters news agency.
"All the indicators suggest that the election will continue on time."
"This sort of overhang is a reflection of our current state of affairs. Only days before the election and there is legal uncertainty," Judge Mohamed Hamad al-Gamal, a former head of the state council, told Reuters.
On parliament, an administrative court said in February that the election rules were unconstitutional.
In that vote, two-thirds of seats were allocated to parties and the rest to individuals who were supposed to be independent of any party.
Gamal said political parties should not have been allowed to run for the individual seats, although they did.
He also said half rather than one-third of the seats should have been apportioned to individuals.
"If it is proven that the election rules were flawed or unconstitutional, then the entire election process is void," Gamal said.
"It would mean that this parliament is unconstitutional, illegitimate and must be dissolved."
Some judicial sources say the constitutional court could delay a ruling on parliament until after the presidential vote.
Under Mubarak, the Supreme Constitutional Court used similar arguments to rule election laws illegal in 1987 and 1990, forcing the dissolution of parliament, overhauls of the electoral system and early elections.
This comes a day after Egypt's justice ministry has issued a decree allowing military police and intelligence officers to arrest civilians suspected of crimes, restoring some of the powers of the decades-old emergency law which expired just two weeks ago.
The controversial order was drafted earlier this month, but was not announced until Wednesday.
The decree applies to a range of offences, including those deemed "harmful to the government", destruction of property, "obstructing traffic", and "resisting orders".
Several of those provisions would allow the military to detain peaceful protesters. Rallies in Tahrir Square, for example, routinely disrupt traffic.
It will remain in effect at least until a new constitution is drafted, according to the ministry.