Ukrainian opposition leaders have signed a deal with the president to end a political crisis that will effectively strip the presidency of much of its power and free from jail the opposition leader, Yulia Tymoshenko.
The pact, which was signed by the president, Viktor Yanukovich, and three main opposition leaders on Friday, paves the way for early elections and a shift in political power towards parliament.
In line with the deal, an emergency session of parliament amended the criminal code in a move that will lead to the release of Tymoshenko, a leader of the 2004 "Orange revolution" who was jailed in 2011 on alleged corruption charges.
It also approved the return of the 2004 constitution, which limits the president's powers and gives politicians the right to appoint key ministers.
Vitaly Zakharchenko, the acting interior minister, was then sacked for his part in the suppression of protests.
However, thousands of anti-government protesters who do not trust the president remain encamped in Kiev's Independence Square.
Al Jazeera's Andrew Simmonds, reporting from Kiev, said the emergency session of parliament effectively voted to strip the president of many powers and decriminalise charges against Tymoshenko.
"This will be a prime move. She was regarded as a heroine of the Orange revolution. Not only does it look like she will be released, it is highly likely she will return to politics."
According to the agreement, a unity government is also expected to be formed in 10 days.
Further constitutional reform will be completed by September and new elections will be held no later than December with new electoral regulations. A joint commission will also launched an investigation into the recent violence.
The deal came a day after all-night talks mediated by the EU ministers in the country and clashes that killed at least 70 people.
Barack Obama, the US president, held a "constructive" phone call with his Russian counterpart Vladimir Putin on Friday and agreed it was important that Ukraine's peace agreement be implemented quickly and that Ukraine's economy is stabilised, a senior US State Department official said on Friday.
"They agreed that the agreement reached today needed to be implemented quickly, that it was very important to encourage all sides to refrain from violence, that there was a real opportunity here for a peaceful outcome," the official told reporters on a conference call.
Protesters in Independence Square on Friday, the scene of bloodshed the day before, said they were frustrated Yanukovich was not stepping down.
"Elections in December are not enough - he has to leave now," said 34-year-old Oleh Bukoyenko, summing up the disgruntled mood of the crowd.
Another protester, 58-year-old Sergiy Yanchukov, said state violence on Thursday was "a crime against humanity" and called for Yanukovich to be sent to the International Criminal Court in The Hague.
Ukraine is the object of a geo-political tug-of-war between Moscow, which sees it as the historical cradle of Russian civilisation, and the West, which says Ukrainians should be free to choose economic rapprochement with the EU.
The protests by EU-supporters in the country have been going on since late November.
Russia, which has been holding back a new loan instalment until it sees stability in Kiev, has at various times condemned EU and US support of opposition demands that Yanukovich, elected in 2010, should share power and hold new elections.
The foreign ministers of France, Germany and Poland help to negotiate the compromise pact. Russia also sent a representative to the negotiations.