Nele Obermüller and Ievgen Shybalov

Special for USA TODAY

DONETSK, Ukraine – Diplomats agreed on Thursday that all sides in Ukraine must end violence though the groups that have been provoking conflict in several cities - pro-Russian Ukrainian militants - were not party to the agreement.

The agreement in Geneva came a day after a clash outside a Ukraine military base ended with the first deaths in an anti-militant operation.

And it came hours after Russian President Vladimir Putin said he had the authority to invade East Ukraine as he admitted he did in the Ukraine province of Crimea.

In Geneva, U.S. Secretary of State John Kerry said the words agreed to on paper must be followed by actions. Andrii Deshchytsia, Ukraine's foreign minister, said the "joint efforts to launch the de-escalation … will be a test for Russia to show that it is really willing to have stability in this region."

Kerry said that if Moscow does not abide by the agreement, "we will have no choice but to impose further costs on Russia."

But Russia denies it is doing anything in East Ukraine, where pro-Russian militants have taken over offices and government buildings in at least 8 cities. So it was unclear what Russia would have to do under the agreement. Also, Europe has been able to agree on whether to impose sanctions on Russian experts, which would hurt its economy as well as Russia's.

Experts noted that Kerry and other Western diplomats agreed to hold off on imposing more sanctions against Russia if it went along with the agreement. Steven Pifer, who served as ambassador to Ukraine under President Bill Clinton, said the big question now is whether the statement will be implemented.

If the militants do not end their occupations, the West "should take it as evidence the Russians did not do their part" to uphold the agreement, Pifer said.

"If the Russian government came out and told people to knock it off, my guess is these things would stop or at least they would begin to decrease in number."

The participants agreed not to issue new sanctions on Russia, but that obligation should be abandoned if the groups do not disband, he said.

"If there's no move to disarm these groups or get them to evacuate buildings, that the West should consider harsher sanctions," Pifer said.

Meanwhile, Putin admitted for the first time in a wide-ranging radio interview in Moscow that the troops in unmarked uniforms who captured Ukraine's Crimean peninsula before its annexation last month by Moscow were indeed Russian soldiers.

"They acted politely, but resolutely and professionally," he said. "There was no other way to hold the referendum in an open, honest and honorable way and allow the people to express their opinion."

Putin said Russia had to act to prevent what he said was NATO's intention to make Ukraine a member and limit Russia's presence in the Black Sea region. NATO, the European military alliance, had no plans to do so and Ukraine had not moved to revoke a lease it had with Russia for its base on its Black Sea port.

Putin described as "nonsense" charges by Ukraine that Russian secret forces have also infiltrated East Ukraine and are assisting pro-Russian militants in their confrontation with the central government. But he maintained he had the authority to invade Ukraine, saying he hoped it would not be necessary.

"I remind you that the Federation Council has given the president the right to use armed forces in Ukraine," he said, referring to the upper house of parliament. "I really hope that I do not have to exercise this right and that by political and diplomatic means we will be able to solve all of the sharp problems."

The Geneva action may end for now Ukraine's anti-militant offensive it had just begun this week to root out occupiers of government buildings. On Wednesday, three pro-Russian militants were killed in a skirmish outside a Ukrainian National Guard base in the Black Sea port of Mariupol in an attack Ukraine's interior ministry called the bloodiest to date by militants.

A mob of around 300 people armed with stun grenades and firebombs attacked the base, refusing to back down even after servicemen in the Mariupol base fired shots, the interior ministry said.

The protests in the east have been ongoing since former president Viktor Yanukovych's ouster in February and the Russian annexation of Crimea last month.

But peaceful demonstrations were held in at least four eastern cities, condemning Russia for meddling in Ukrainian affairs. At a rally in Donetsk, which drew a few thousand people, the crowd listened to speeches against the pro-Russian movement.

"I strongly want Donbass (the area covering the Donetsk and Lugansk regions) to stay in the Ukraine," said Yuriy Ivanov, 49, from Donetsk. "Every revolution or other great change means a downgrade. Prices for all foods would go up."

But others worry less about economic consequences and want to join Russia.

"Ukrainians are cowards. When troubles began, for example, our old power escaped, and their supporters changed colors," Alexander Ryabchenko, 25, from Donetsk said.

"Donbass has to be part of Russia. We all know who created this Ukraine – Lenin, Brezhnev etc. We always were a part of Russia."

Contributing: Luigi Serenelli in Berlin, Nele Obermüller reported from Berlin, Associated Press