President Viktor Yushchenko acceded to his arch-rival's political comeback after securing from Yanukovych a pact to continue Ukraine's pro-Western course, uphold democratic freedoms and ensure the opposition has equal rights during elections.
The pact cements Ukraine's EU aspirations and promotes cooperation with NATO, but says membership can only come after a referendum.
It was the ballot-stuffing in Yanukovych's favor during the 2004 presidential election that sparked the Orange Revolution mass protests, which helped usher Yushchenko into power. Yanukovych, who was then prime minister, had received strong backing from the Kremlin.
The pact on national unity has no legal force, but Yushchenko, who once denounced Yanukovych as an enemy of democracy, said he still felt protected.
Yushchenko was also receiving some immediate sweeteners. Besides voting in Yanukovych, parliament was expected to swear in Ukraine's Constitutional Court judges. The court has been without a quorum since late last year, after parliament refused to swear in Yushchenko's choices or pick their own.
Yushchenko will try to maintain influence by having his bloc, Our Ukraine, participate in the new coalition, which includes Yanukovych's Party of Regions, the Socialists and Communists.
Party of Regions has suggested it would lay claim to most of the Cabinet positions focusing on economic affairs. But in another concession to Yushchenko, it offered him Interior Minister, allowing the president to maintain control over the country's law enforcement bodies.
Under the Constitution, Yushchenko also chooses the foreign and defense ministers.
Critics of the new partnership between the former Orange Revolution foes call it a betrayal, and black ribbons were hung on some trees near parliament.