Under heavy pressure from the West following a deadly day of clashes and sniper fire in the capital, President Viktor Yanukovych and opposition leaders struck a deal Friday aimed at bringing Ukraine's three-month political crisis to an end. But radical protesters and some pro-Russian factions rejected it, leaving lingering doubts over whether peace could be restored.

On a day of electrifying developments, the Ukrainian parliament also opened a path for Yulia Tymoshenko — Yanukovych's political nemesis — to be let out of prison.

In spite of what looked like a significant government retreat, protesters booed opposition figures who took to a stage Friday evening to present the deal, which cuts Yanukovych's powers and calls for early elections but falls short of demands for his immediate resignation.

"Death to the criminal!" some chanted, referring to Yanukovych.

"Resign! Resign! Resign!" shouted others as one radical speaker threatened to go on an armed offensive if the opposition doesn't demand the president's resignation by Saturday morning.

Addressing the crowd in Kyiv's Independence Square, opposition leader Vitali Klitschko tried to persuade them that Yanukovych had likely given all he was willing to give.

"He's not going to resign. This isn't realistic. We have to think about realistic steps," Klitschko said.

The agreement signed Friday calls for presidential elections to be moved up from March 2015 to no later than December, but many protesters said that is far too late. And it does not address the issue that set off the protests in November — Yanukovych's abandonment of closer ties with the European Union in favor of a bailout deal with longtime ruler Russia.

The standoff between the government and protesters escalated this week, as demonstrators clashed with police and snipers opened fire in the worst violence the country has seen since the breakup of the Soviet Union a quarter-century ago. The Health Ministry put the death toll at 77 and some opposition figures said it's even higher.

The U.S., Russia and the 28-nation EU are deeply concerned about the future of Ukraine, a divided nation of 46 million. The country's western regions want to be closer to the EU and have rejected Yanukovych's authority in many cities, while eastern Ukraine favours closer ties with Russia.

Limits on presidential power

Hours after the deal was signed, Ukraine's parliament voted to restore the 2004 constitution that limits presidential authority, clawing back some of the powers that Yanukovych had pushed through for himself after being elected in 2010.

Parliament then voted to fire the interior minister, Vitali Zakharchenko, who is widely despised and blamed for ordering police violence, including the snipers who killed scores of protesters Thursday in Kyiv, the capital that has been nearly paralyzed by the protests.

Then the parliament, which once was overwhelmingly pro-Yanukovych, took the bold move of approving a measure that could free arch-rival Tymoshenko, who has served two and a half years on a conviction of abuse of office, charges that domestic and Western critics have denounced as a political vendetta.

Legislators voted to decriminalize the count under which Tymoshenko was imprisoned, meaning that she is no longer guilty of a criminal offence.

"Free Yulia! Free Yulia!" lawmakers chanted.

However, Yanukovych must still sign that bill into law, and then Tymoshenko's lawyers would have to ask the court for her release from prison in the eastern city of Kharkiv.

Former Ukraine prime minister Yulia Tymoshenko is shown in 2011, before she was sentenced to seven years in jail. Parliament voted to free her Friday, as politicians attempt to defuse the country's crisis. (Sergei Chuzavkov/Associated Press)

Yanukovych fears her popularity. The charismatic blond-braided heroine of the 2004 Orange Revolution — which also drove Yanukovych from the presidency — Tymoshenko served as prime minister and narrowly lost the 2010 presidential election to Yanukovych.

With Yanukovych's supporters quitting his party one after another Friday, legislators also approved an amnesty for protesters involved in violence.

Under the agreement, Ukrainian authorities also will name a new unity government that includes top opposition figures within 10 days.

The deal was a result of two days and all-night of shuttle diplomacy by top diplomats from Germany, France and Poland, who talked with the president and the opposition.

In Washington, White House press secretary Jay Carney said the deal is consistent with what the Obama administration was advocating, and that the U.S. will closely monitor whether it is fulfilled, holding out the threat of more sanctions if it's not.

"The agreement is a necessary compromise in order to launch an indispensable political dialogue that offers the only democratic and peaceful way out of the crisis that has already caused too much suffering and bloodshed on all sides," European Union President Herman Van Rompuy said.

But neither side won all the points it sought, and some vague conditions could ignite strong disputes down the road.

'Goals of the Maidan have not been achieved'

The deal calls for protesters to hand over all their weapons, withdraw from buildings they have occupied and take down the camps they have erected around the country. It is far from clear that the thousands of protesters camped out in Kyiv's Independence Square — known as the Maidan — will pack up and go home.

"The Maidan will stand up until Yanukovych leaves," declared one protester, 29-year-old Anataly Shevchuk.

"I hope that the direction of the country changes, but so far the goals of the Maidan have not been achieved," said another, 45-year-old Kira Rushnitskaya. "Yanukovych agreed to give up powers to stay in power overall."

Ukraine's President Viktor Yanukovich, right, shakes hands with opposition leader Vitaly Klitschko on Friday. (Reuters)

The agreement did not set a deadline for leaving the camp and many protesters are likely to move out slowly, both because of the emotional closeness the camp fostered and because of their distrust that the deal will actually be implemented.

Shots were heard Friday morning, a day after the deadliest violence since Ukraine became independent in 1991. It is unclear who was targeted and whether anyone was hurt or injured. A tense calm prevailed in the square late Friday.

The leader of one of the major radical groups, Pravy Sektor, declared that "the national revolution will continue," according to the Interfax news agency.

The deal has other detractors, too.

Leonid Slutsky, a Russian lawmaker who chairs the committee in charge of relations with other ex-Soviet nations, told reporters that the agreement serves the interests of the West.

"We realize where and by whom this agreement has been written. It's entirely in the interests of the United States and other powers, who want to split Ukraine from Russia," he said.

Russia's Foreign Ministry issued a statement saying that Russian mediator Vladimir Lukin's refusal to sign the deal doesn't mean that Moscow isn't interested in looking for a compromise to end the bloodshed.

"We will stand ready to continue helping Ukrainians normalize the situation if they ask for it," it said.

The statement said Ukrainians should take into account all regions in its political transition — apparently referring to the areas in Ukraine's east and south that have close economic ties to Russia and where some see the protesters as puppets of the West.

In addition to anger over the failed EU deal, protesters across the country are upset over corruption in Ukraine, the lack of democratic rights and the country's ailing economy, which just barely avoided bankruptcy with the first disbursement of a $15 billion bailout promised by Russia. The recent violence has added to Ukraine's dire economic troubles.