Updated

Ukraine's political rivals agreed early Tuesday on legislation to ensure a fair vote during the rerun later this month of the fraud-ridden presidential runoff but remained divided on constitutional amendments trimming presidential powers.

In addition to supporting changes in election laws, outgoing President Leonid Kuchma (search) agreed to change the Central Election Commission, which was accused of covering up rampant fraud during the Nov. 21 runoff.

On Monday, Kuchma and Russian President Vladimir Putin (search) had said they would abide by the results of the new election, removing major question marks surrounding the Dec. 26 rematch. The vote was ordered by the Supreme Court, which last week struck down the election commission decision that Kremlin-backed Prime Minister Viktor Yanukovych (search) won the runoff.

"Of course we will ... accept the will of any nation in the former Soviet space, and will work with any elected leader," Putin said during a state visit to Turkey.

Yanukovych emerged from seclusion and declared he was confident of victory. Kuchma had supported Yanukovych in the runoff against Western-leaning opposition leader Viktor Yushchenko but has distanced himself from the prime minister over the past two weeks as protesters swarmed the capital.

Tuesday's agreement on electoral law changes was reached during six-hour talks involving Kuchma and the two candidates and brokered by European Union foreign policy chief Javier Solana, Lithuanian President Valdas Adamkus and Polish President Aleksander Kwasniewski.

Kuchma emerged from the talks after midnight and said the parties had failed to reach agreement on his initiative to push through constitutional reform to transfer some powers from the presidency to parliament.

Yushchenko had opposed the constitutional changes, saying that Kuchma and his allies want to weaken the presidency, fearing his victory in the election rematch with Yanukovych.

However, just before the talks, Yushchenko's allies in parliament reached a tentative agreement with pro-government lawmakers to approve changes in the electoral laws and the constitutional amendments on presidential powers simultaneously Tuesday.

The later announcement appeared to indicate that the deal was in trouble and could collapse when it comes to a vote. Yushchenko had refused to support such a compromise when it was raised in parliament on Saturday.

The agreement also called for the lifting of the opposition blockade of government buildings after the approval of electoral changes in parliament. Tens of thousands of Yushchenko's supporters have besieged official buildings in Kiev for nearly two weeks, paralyzing the government's work.

The talks were held at the presidential Mariinsky palace, which was surrounded by Yushchenko's supporters who shouted: "Down with Kuchma!"

In his remarks, Putin warned against foreign interference in the new ballot and suggested the opposition was seeking power at any price. He left open how Russia — which considers this nation of 48 million people part of its sphere of influence — would deal with a Yushchenko government.

On the streets of the Ukrainian capital, opposition demonstrators countered Putin's warning with an appeal of their own, unveiling a 200-foot-long petition — inscribed on a roll of cloth in the opposition's trademark color of orange — urging the Russian leader to stay out of Ukrainian affairs.

"Putin has his own country to rule," said Yura Shtoiko, 28, a supporter of Yushchenko.

Kuchma sought to defuse tensions, saying in televised remarks that he is ready for "further steps to ease the absolutely baseless tension in society."

In his first public comment since the court decision, Yanukovych told supporters he had appointed a new campaign chief and would reshuffle his regional campaign headquarters.

"We are confident of our victory," he said. "I will prove in the Dec. 26 vote that I have the support of the majority of the Ukrainian people."

"This is not a revolution, but political technologies with involvement of special services. The organizers of street actions have committed a great sin, and they will still answer before God," Yanukovych said in comments apparently meant for his Russian-speaking base in eastern Ukraine.

As leaders talked, the situation in Kiev's streets appeared to stabilize. Dozens of government employees walked past Yushchenko's supporters to return to work — the largest number of bureaucrats allowed into the building since protesters blockaded the entrance late last month.

Protesters in orange hard hats and ponchos stood shoulder-to-shoulder to create a corridor for about 60 low-ranking employees to pass through. Self-appointed security personnel among the demonstrators checked identification badges and other documents before allowing the group to enter the building.

Also Monday, Defense Minister Oleksandr Kuzmuk suggested that the military would not intervene on either side in the battle for the presidency because "the army does not serve an individual but the entire people."

"I do not believe that anyone will order the use of force against people," Kuzmuk said. "If that happens we will follow the constitution."