Ukraine's parliament has passed a wide-ranging reform bill, paving the way for a 26 December re-run of the disputed presidential election.
Yushchenko's supporters have now been told to prepare for the poll
The compromise package includes electoral law changes demanded by the opposition, but also transfers some presidential powers to parliament.
Outgoing President Leonid Kuchma immediately signed the bill into law.
The opposition said it would now lift its blockade of the government's main office, but not Mr Kuchma's residence.
"This is an act of consolidation and reconciliation, an act which demonstrates that Ukraine is united," speaker Volodymyr Lytvyn told the chamber after the vote.
Pro-Western opposition leader Viktor Yushchenko will face pro-Russian Prime Minister Viktor Yanukovych, President Leonid Kuchma's preferred successor, in a re-run of last month's presidential run-off vote.
Mr Yanukovych was declared the winner of the 21 November poll, but Mr Yushchenko - backed by international observers - declared the election fraudulent.
Ukraine's Supreme Court subsequently annulled the election and ordered the re-run.
Thousands of opposition supporters have been on the streets of the capital, Kiev, and other cities since the political crisis began, camping out in freezing conditions.
Mr Yushchenko congratulated many thousands of his cheering supporters with "a great victory", saying that all the demands of the opposition had now been met.
"After 17 days of peaceful civil protest, we have achieved a final victory... It happened only thanks to you," he said.
He said the December poll was now the main target, urging many of his supporters to go home and prepare for the ballot.
But he said Kiev's Independence Square - with its tent city - would remain the opposition's command headquarters until after the elections.
Opposition leaders said they would allow the government - without Mr Yanukovych - to enter the main office in Kiev on Thursday.
There was an overwhelming majority in favour of the changes, with 402 of the 450 MPs in Ukraine's parliament backing the reform package.
Mr Yushchenko (left) says last month's poll was rigged
Lawmakers stood and cheered as President Kuchma signed the measure in the chamber.
"Over the last 100 years, Ukraine has more than once suffered through a crisis, but there was always enough
common sense to find a way out and a decision," Mr Kuchma said.
He added that he had accepted the resignation of Ukraine's prosecutor general, one of several opposition demands.
The package of measures include:
- Reforming the Central Election Commission, dismissing the chairman and some other members
- Changes designed to reduce possibility of ballot fraud, such as limiting the use of absentee ballots and home voting
- Reduced powers for the president who may now only appoint the prime minister, defence and foreign minister, subject to legislators' approval
- New functions for the regions, designed to ease tensions between the pro-Yushchenko west and pro-Yanukovych east.
Correspondents say Wednesday's vote is likely to increase Mr Yushchenko's chances of winning the new run-off, albeit with weaker powers.
The political crisis in Ukraine has provoked diplomatic disagreements between the West and Russia, which has accused the United States and the European Union of trying to install their ally in Kiev.
EU foreign policy chief Javier Solana, who has mediated in the crisis, welcomed Wednesday's vote, as did US Secretary of State Colin Powell.
But Russia's mediator, parliamentary speaker Boris Gryzlov, was more equivocal.
"I am deeply convinced that only Mr Yanukovych's victory will allow Ukraine to remain an integral and united country," he said.
Meanwhile, the director of an Austrian clinic has denied a report alleging that doctors who treated Mr Yushchenko for a mysterious illness have determined that he was poisoned.
The report was published in London by the Times newspaper.
In the run-up to the disputed poll, Mr Yushchenko's appearance changed markedly, with his face becoming a mass of scars and blisters.
The director of the Rudolfinerhaus in Vienna, Michael Zimpfer, said the clinic had yet to reach a conclusion about whether Mr Yushchenko was poisoned.
"The truth is that we are meticulously investigating that, and we are running entirely new tests in different
labs, but there is no evidence so far," he said.