The Supreme Court in the Democratic Republic of Congo has ruled that the second round of landmark elections can go ahead as planned.
The Congolese had not had a free vote since 1960
It overturned its own ruling earlier this week that the 29 October date broke the constitution.
The court has also confirmed that President Joseph Kabila and ex-rebel leader Jean-Pierre Bemba would contest the run-off.
The 30 July election was the first democratic poll to be held since 1960.
The announcement of provisional first round results led to days of gun battles in Kinshasa between the two men's security forces, which left 23 people dead.
Earlier this week, the two second-round candidates held a two-hour meeting to ease tension.
The United Nations is spending $1bn a year on its peacekeeping mission in DR Congo - the largest in the world.
The Supreme Court has ruled that because of exceptional circumstances, the electoral commission could have 50 days from the announcement of the first round results to organise the second round, instead of 15 as stated in the constitution.
The commission lodged an appeal, saying it would not be possible to organise polls at such short notice in a country two-thirds the size of Western Europe with very little infrastructure.
"We have to provide 60,000 electoral kits in nearly 50,000 polling stations, we have to print the ballot papers and distribute them around a vast territory. It all takes a long time," Independent Electoral Commission spokesman Dieudonne Mirimo told the AFP news agency.
Joseph Kabila (l) faces Jean-Pierre Bemba (r) in October's run-off
The Supreme Court confirmed that in the first-round, Mr Kabila took 45% of the vote, just short of the 50% needed for victory, while Mr Bemba got 20%.
On Thursday, the first integrated unit of the presidential guard finished their military training.
The 800 soldiers had fought with five different armed groups during DR Congo's five-year conflict, which officially ended in 2003.
The lack of progress in forming a single national army is seen as a major obstacle in DR Congo's peace process.
The 12,000-strong presidential guard is regarded as Mr Kabila's personal force, while Mr Bemba and other former rebels still have their own forces.
Mr Kabila won a landslide in the Swahili-speaking, war-ravaged east, where he is praised for bringing peace.
However, many in the Lingala-speaking west doubt Mr Kabila's Congolese nationality and voted for Mr Bemba.