KIEV, Ukraine (AP) — In a fast-moving day that aimed to reshape Ukraine's political destiny, opposition leaders reached a deal Friday with the country's beleaguered president to form a new government and hold an early election, while parliament slashed his powers and voted to free his rival, former Prime Minister Yulia Tymoshenko, from prison.
It was a crucial day in Ukraine's months-long standoff between President Viktor Yanukovych and protesters angry that he abandoned closer ties with Europe for a bailout deal last year with longtime ruler Russia.
If it holds, the ambitious agreement could be a major breakthrough in a months-long crisis over Ukraine's identity. The standoff worsened sharply this week and left scores dead and hundreds wounded in the worst violence the country has seen since it became independent in 1991.
It's unclear, however, how well the sweeping, European-mediated deal signed Friday would go down with all the sides involved in Ukraine's protracted political crisis. A Russian mediator refused to sign the deal, and a senior Russian lawmaker criticized it as being crafted for the West.
And at the sprawling protest encampment in central Kiev, hardened Ukrainian protesters angry over police violence showed no signs of abandoning their positions.
The agreement signed Friday says presidential elections will be held no later than December, instead of March 2015 as scheduled. Many protesters say December is too late — they want Yanukovych out immediately.
The U.S., Russia and the 28-nation EU are deeply concerned about the future of Ukraine, a nation of 46 million that has divided loyalties between Russia and the West. The country's western regions want very much to be closer to the EU and have rejected Yanukovych's authority in many cities, while eastern Ukraine favors closer ties with Russia.
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.
They immediately started to use those new powers. The Verhovna Rada 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 Kiev, the capital that has been nearly paralyzed by the protests.
The next order of business was Tymoshenko. Legislators voted to decriminalize the count under which she was imprisoned, meaning that she is no longer guilty of a criminal offense.
"Free Yulia! Free Yulia!" legislators chanted after the vote.
However, Yanukovych must still sign that bill into law. It's not immediately clear when Tymoshenko might be released from prison in the eastern city of Kharkiv. 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.
The next year, she was arrested and sentenced to seven years in prison on abuse of office charges the West has denounced as a political vendetta.
With Yanukovych's supporters quitting his party one after the other throughout the day Friday, legislators also approved an amnesty for protesters involved in violence.
Ukrainian authorities also will now name a new unity government that includes top opposition figures within 10 days.
The deal was a result of two days and all-night shuttle diplomacy by top diplomats from Germany, France and Poland, talking to the president and opposition.
White House press secretary Jay Carney said the deal is consistent with what Washington 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.
But neither side won all the points it sought, and some vague conditions could ignite strong disputes down the road.
The deal says opposition protesters should hand over any weapons and withdraw from buildings they have occupied and protest camps around the country. It is far from clear that the thousands of protesters camped out in Kiev on Friday will pack up and go home.
"Resign! Resign! Resign!" they chanted.
"The Maidan will stand up until Yanukovych leaves," said protester Anataly Shevchuk, 29. "That's the main demand, both for those who were killed, and for those who are still standing on the Maidan."
"I hope that the direction of the country changes, but so far the goals of the Maidan have not been achieved," said Kira Rushnitskaya, a 45-year-old protester. "Yanukovych agreed to give up powers to stay in power overall."
No deadline for leaving the camp in central Kiev has been set and many protesters are likely to move out slowly, both because of the emotional closeness the camp fostered and because of distrust that the deal will actually be implemented.
The capital remained tense Friday. Shots were heard in the morning, a day after the deadliest violence in Ukraine's post-Soviet history. It is unclear who was targeted and whether anyone was hurt or injured.
The leader of a radical group that has been a driver of violent clashes with police, Pravy Sektor, declared Friday 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 Friday 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 Russia 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.
It 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, 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 added to Ukraine's dire economic troubles. Ratings agency Standard & Poor's downgraded Ukraine's debt rating Friday, saying the country could default without significant political improvements.
Jim Heintz, Efrem Lukatsky, Yuri Uvarov and Angela Charlton in Kiev, Vladimir Isachenkov in Moscow and Frank Jordans in Berlin contributed to this report.