Ukraine's electoral commission has declared Viktor Yushchenko the official winner of last month's re-run presidential election.
The re-run elections were held on 26 December
It said Mr Yushchenko won 51.99% of the vote, with his rival Viktor Yanukovych gaining 44.2%.
The result clears the way for Mr Yushchenko, who led protests against the result of November's first run-off, to become Ukraine's third president.
Aides to Mr Yanukovych have pledged to lodge an appeal against the result.
Chief of the electoral commission Yaroslav Davydovych announced the result live on Ukrainian television shortly before a midnight deadline expired.
Mr Yushchenko won 2.27 million votes more than Mr Yanukovych, on a turnout of 77.19%, the commission declared.
The BBC's Steven Eke says Mr Yushchenko understands the inner workings of power in Ukraine, having previously worked as both prime minister and head of the national bank.
Mr Yushchenko's inauguration is expected as early as 15-16 January.
But Mr Yanukovych's camp pledged to appeal to the Supreme Court within the next two days, claiming that millions of Ukrainians were deprived of their right to vote because of violations.
The electoral commission's statement must be published in two official newspapers before Mr Yushchenko can be inaugurated.
This technically gives Mr Yanukovych's camp a window for filing more legal actions, although analysts say there is little hope of a last-minute turnaround.
The Supreme Court has already rejected a further four appeals by Mr Yanukovych, who alleges the December result is flawed.
Last week, the court threw out his appeal alleging widespread fraud and asking for the vote to be annulled.
Mr Yushchenko has described his opponents' challenges as "torturing the nation".
Mr Yushchenko cannot be sworn in as president until his rival exhausts all legal possibilities to challenge the election results.
International observers praised the conduct of the re-run, saying it was much fairer than the earlier rounds.