The bitter, marathon Ukrainian presidential election is heading for its climax, with a re-run of the disputed second round set for 26 December.
Hours after campaigning officially came to an end, the Constitutional Court issued an election-eve ruling striking down one reform limiting absentee ballots, which had been at the heart of allegations of fraud.
Pro-Western opposition leader Viktor Yushchenko and his rival Prime Minister Viktor Yanukovych, who favours closer ties with Russia, are the candidates for Sunday's run-off vote.
What effect will the new court ruling have?
The Constitutional Court struck down limits on home voting for the disabled, which had been opposed by Mr Yanukovych's camp.
The ruling may be a blow to Mr Yushchenko - whose supporters said mobile ballot boxes were stuffed with votes for Mr Yanukovych - but other reforms passed by parliament in a bid to end the electoral crisis will stand.
International observers had also been concerned about the opportunities for fraud associated with home voting, but officials say Sunday's vote will go ahead as planned.
Anyone who cannot get to a polling station for health reasons on Sunday will now be able to vote, provided they inform their regional election commissions by 1800 GMT on Saturday.
Their ballots will be collected at their homes or hospitals by regional officials on polling day.
Why is the second round being held again?
Mr Yanukovych was declared the official winner of the poll, but the result was later ruled illegal by the Supreme Court, due to widespread fraud.
The Ukrainian parliament then approved a compromise reform package, in a major breakthrough towards resolving the tense election stand-off.
Deputies approved a bill containing both changes to the electoral law - demanded by the opposition - and a controversial constitutional amendment transferring some of the president's powers to parliament. Outgoing President Leonid Kuchma had pushed for that amendment.
Mr Yushchenko is still the firm favourite to win the re-run.
What exactly was the deal?
After hard bargaining, President Leonid Kuchma, who backs Mr Yanukovych, agreed to replace the current central electoral commission.
The Constitutional Court overruled other changes designed to reduce the possibilities for falsification: limiting voting from home to invalids and cutting the proportion of absentee ballots allowed from 4% of the total to 0.5%. Multiple voting and very high numbers of votes cast from home were among the main abuses identified in the second round.
While these changes pleased the opposition, the constitutional amendment transferring important powers from the president to parliament was a condition set by President Kuchma and the government.
Under the reforms, the president would lose the power to appoint all top posts except for the prime minister, defence and foreign ministers.
What was President Kuchma's role in the crisis?
Mr Yanukovych appeared to be in a strong position going into the election, backed by President Kuchma and Russian President Vladimir Putin.
The pro-Kuchma and pro-government parties hold a near-majority of seats in parliament.
Mr Kuchma has been president for 10 of the 13 years since Ukraine gained independence from the Soviet Union and has acted as a master powerbroker among the clans controlling Ukraine's economy.
But the chorus of criticism over election abuses - including from international observers - and the massive opposition street protests forced Mr Kuchma to back down over the official results.
Officially, Mr Yanukovych won 49.46% of the vote on 21 November, while Mr Yushchenko got 46.61%.
But in a key ruling, Ukraine's Supreme Court said a repeat vote must be held by 26 December, upholding opposition claims that the central electoral commission was wrong to declare Mr Yanukovych the winner.
What role has the outside world played?
Tensions have arisen between Russia and the US, with President Putin accusing the West of playing "sphere of interest" politics in Ukraine.
US Secretary of State Colin Powell hit back, saying the people of Ukraine deserved fair elections - and did not have to choose between East and West.
Mr Putin had initially congratulated Mr Yanukovych, but later backed efforts to resolve the dispute within the country's legal framework. Moscow - which dominated Ukraine in Soviet times - played a significant role in the controversial election, with Mr Putin appearing alongside Mr Yanukovych during the campaign.
After the mass demonstrations erupted, Russian official Boris Gryzlov, EU foreign policy chief Javier Solana, Polish President Aleksander Kwasniewski and Lithuanian President Valdas Adamkus were all involved in mediation efforts.
Could things still turn violent?
Election-related violence now looks increasingly unlikely.
Immediately after the controversial second round, Mr Yushchenko had called for a general strike and his supporters had confronted riot police outside the presidential administration building.
Yanukovych supporters rallied in the industrial east and also confronted Yushchenko supporters in Kiev, but the tensions did not escalate into clashes.
What is the election system?
All Ukrainian citizens aged 18 and above are allowed to vote. There are about 36 million registered voters.
Candidates with criminal records are barred from standing for election. Mr Yanukovych served two prison terms in his youth but he says the convictions were quashed and the records erased. The opposition made this a campaign issue.
Why does Ukraine matter to Europe?
Bigger than France, and right on Russia's doorstep, Ukraine lies on a geopolitical fault line between East and West.
It has a population of 48.1 million and is the historic cradle of the Russian state. Ethnic Russians make up about 17% of the population.
Since the break-up of the Soviet Union in 1991, Ukraine's leaders have maintained close ties with Moscow - Kiev's main trading partner - while the Baltic republics have developed much closer ties with the West, joining Nato and the EU.
However, Ukraine has played an active part in Nato's Partnership for Peace programme and has declared EU membership to be a strategic objective.
Experts say the new run-off will decide whether Ukraine moves closer to the West - as Mr Yushchenko wants - or towards Moscow, under Mr Yanukovych.
Central European states such as Poland have long hoped for a westward-looking buffer between them and Russia.