Donetsk, Ukraine (CNN) -- Diplomats meeting for emergency talks on the crisis in Ukraine issued a joint statement Thursday aimed at de-escalating the tensions and ensuring the security of all Ukrainians.
The statement -- which appears to be the biggest step toward calming the situation in days -- followed talks lasting several hours between U.S. Secretary of State John Kerry, Russian Foreign Minister Sergey Lavrov, his acting Ukrainian counterpart, Andriy Deshchytsia, and EU foreign policy chief Catherine Ashton.
The pact calls for all illegal armed groups to be disarmed, all illegally seized buildings to be returned to their legitimate owners and all occupied public spaces to be vacated. It promises amnesty for protesters who leave buildings and give up their weapons, apart from those convicted of capital crimes.
It also urges a halt to violence in Ukraine and condemns all extremism, racism and religious intolerance, including anti-Semitism, in the country.
Kerry, speaking alongside Ashton, said the sides had worked hard to narrow the differences between them.
But he stressed that the agreement was just words and that the proof of it would be in its swift implementation on the ground.
"What is important is that these words are translated into actions and none of us leave here with the sense that the job is done, because the words are on the paper," he said. "The job will not be done until these principles are implemented and are followed up on."
Kerry warned that Russia could face "further costs" if the situation does not de-escalate in line with the concrete steps set out in the statement. Ukraine's leaders must also play their part in calming the situation, he said.
Asked about what NATO has said is a large Russian troop build-up near the border with Ukraine, Kerry said "our hope is" that Russia will withdraw more troops from the area as steps to de-escalate the Ukraine crisis are implemented.
Russia indicates that it has withdrawn one battalion from the area in response to the West's calls for deescalation, Kerry said.
All sides have agreed to ask for monitors from the Organization for Security and Cooperation in Europe, which has a mission in Ukraine, to help implement the measures.
U.N. Secretary-General Ban Ki-moon welcomed negotiations, while stressing that the situation in Ukraine remains "extremely volatile."
Ban "expects all sides, moving forward, to show their serious intention to continue to engage, in a good-faith effort, and to implement the steps laid out in the Geneva Statement, which will contribute to a lasting solution to this crisis," a U.N. statement read.
Ukrainian Prime Minister Arseniy Yatsenyuk said Thursday that he was happy but cautious after the Geneva talks.
Yatsenyuk said he was willing to grant more autonomy to eastern Ukraine in order to defuse tensions.
He took aim at Russian President Vladimir Putin, however, saying that Putin wants to restore the Russian empire and that a new Soviet Union would be a disaster for Europe.
Obama: U.S. military options not on the table
"I don't think we can be sure of anything (in the Ukrainian crisis). I think there is the possibility, the prospect, that diplomacy may de-escalate the situation," U.S. President Barack Obama said Thursday at the daily White House news conference when asked about the meeting in Geneva between top officials from the United States, Russia, Ukraine and the European Union.
He said referred to "a promising public statement" to disarm all groups that have been occupying buildings in eastern Ukraine, pointing out that the Russians have signed on to that statement. "We're not going to know whether there is follow-through on these statements for several days," Obama said.
The President stressed that he has emphasized to Putin that the United States will continue to uphold the basic principles of sovereignty of all countries.
"It is our belief ... that Russia's hand is in the disruptions and chaos that we've been seeing in southern and eastern Ukraine," Obama said. "But there is an opportunity for Russia to take a different approach. We are encouraging them to do so. In the meantime, we're going to prepare additional responses should Russia fail to take a different course."
The President emphasized that he's been very clear that U.S. military options are not on the table in dealing with the situation in Ukraine.
Lavrov: 'Disgusting expressions'
Kerry said Ukraine's interim leaders had made an impressive commitment toward listening to the demands of people in different regions of Ukraine, including the restive east, for increased autonomy and had promised constitutional reforms.
He said the agreement offered the best prospect for a positive way forward for Ukraine.
Lavrov, giving a separate news conference in Geneva, echoed the commitments of the joint statement, as well as stressing the need for Russian speakers in Ukraine to be protected from discrimination.
Speaking about the agreement to condemn extremism in Ukraine, Lavrov alleged that members of Ukraine's Parliament had made "absolutely disgusting expressions" against those who speak Russian.
He urged a national dialogue in Ukraine, saying the process of constitutional reform must be transparent, inclusive and accountable -- and that it was down to Ukrainians themselves to decide their future.
Russia has said it reserves the right to intervene in eastern Ukraine to protect ethnic Russians.
The four parties stressed the importance of Ukraine's financial and economic stability, the statement added, "and would be ready to discuss additional support as the above steps are implemented."
Military base attacked
The emergency talks in Geneva were called in the hope of resolving a deepening crisis that has seen armed pro-Russian protesters seize swaths of Ukraine.
The unrest in the east, which shares a border with Russia, has been spiraling so fast it has left diplomacy in the dust, amid the worst crisis in East-West relations since the end of the Cold War.
Kiev's embattled new leaders have been struggling to reassert their authority in eastern towns largely controlled by armed pro-Russian separatists. They have tried dialogue and a show of force, both to little effect.
In the southeastern city of Mariupol, a gang of 300 attacked a Ukrainian military base Thursday, leading to gunfire between the two sides. In Donetsk, the self-declared chairman of the people's council said he wants a referendum by May 11 to ask residents whether they wanted sovereignty.
And in Slaviansk, pro-Russian militants are firmly in control.
The Geneva gathering, held amid talk in the United States of fresh sanctions, was the first meeting since the crisis worsened.
Speaking earlier in the day in a televised question-and-answer session, Putin said the talks were important "to figure out how to get out of this situation."
However, he also reiterated his thoughts about Kiev's new interim government -- in place since pro-Moscow President Viktor Yanukovych was ousted in February after months of protests -- calling it "illegitimate" and without a national mandate.
Presidential elections in May are taking place under "unacceptable conditions," he added
"If the elections are to be legitimate, the constitution of Ukraine needs to be revised," he said.
Attack on military base
Earlier Thursday, about 300 pro-Russian militants repeatedly attacked a military base in Mariupol, Kiev said.
Soldiers opened fire, killing three attackers, wounding 13 and detaining 63 others. But some soldiers surrendered.
"The 25th Airborne Brigade whose soldiers showed cowardice and laid down weapons will be disbanded," acting President Oleksandr Turchynov told Parliament. "Guilty soldiers will stand before the court."
Vitaliy Naida, a senior counterintelligence officer with Ukraine's security service, the SBU, said investigators are still trying to determine the nationalities of the 63 people detained in Mariupol.
He said that 16 of them were not carrying ID at the time of arrest and that he was not able to confirm whether any are Russian citizens at this stage.
Since March, officers have taken around 40 Russian citizens and their recruited Ukrainian agents into custody, he said. Five of these people have Russian military backgrounds.
Seeking another referendum
In an ominous echo of what happened in Crimea just weeks ago, the Donetsk People's Republic wants to follow that region's lead and hold a referendum early next month, said Denis Pushilin, the self-declared chairman of the people's council. The referendum will essentially ask residents which country they want to be a part of: Russia or Ukraine.
Moscow annexed the Crimean peninsula last month after its predominantly Russian-speaking residents voted yes in a referendum.
The moved was deemed illegal by Kiev and the West, but Putin has repeatedly defended it.
"The threats to Russian-speaking people were absolutely clear, and that is why people of Crimea voted for their future and asked Russia for help," he said. "Russia never planned any annexation, never, quite the contrary."
Putin also said Russian forces had been active in Crimea in order to support local defense forces, the first time he has acknowledged the deployment of Russian troops on the Black Sea peninsula.
The interim authorities in Kiev said Thursday that Ukraine has tightened its border controls while efforts to contain the uprising in the east continue.
Sergey Astahov, a spokesman for Ukraine's Border Service, said it is restricting the entry of Russian males aged 16 to 60, letting them enter only under exceptional circumstances. He said the tighter checks are due to the ongoing anti-terror operation announced this week by the government.
Russian airline Aeroflot also said on its website that Ukraine was imposing tighter border controls on Russian men and Ukrainian citizens registered in Crimea and the Crimean city of Sevastopol.
Russia is demanding an immediate official clarification from Ukraine regarding the steps taken by the Ukrainian border services, the Russian Foreign Minister said in a statement Thursday.
Threats of sanctions
Kiev and the West dispute Putin's claims that Russia is not involved in the current unrest in Ukraine's east. They accuse Moscow of backing the pro-Russian protesters and point to the 40,000 Russian troops that NATO says are assembled near the Ukrainian frontier.
Moscow insists that the troops are merely conducting exercises.
There are no Russian divisions in eastern Ukraine, Putin reiterated Thursday, adding that all evidence pointed to the groups causing the unrest being local residents.
He said the presence of tanks and planes constituted "a very serious crime" that authorities in Kiev were committing.
Moscow has warned in the past week that Ukraine was "on the brink of a civil war."
On Wednesday, Obama said Russia's actions risk more sanctions for the country.
"What I've said consistently is that each time Russia takes these kinds of steps that are designed to destabilize Ukraine and violate their sovereignty, that there are going to be consequences. And what you've already seen is the Russian economy weaker, capital fleeing out of Russia," Obama told CBS.
Obama has signed off on sending more nonlethal aid to the Ukrainian military, U.S. Secretary of Defense Chuck Hagel announced Thursday.
The Pentagon is still not supporting lethal aid for Ukraine "because it could exacerbate the situation, which is what we do not want to do," a senior Pentagon official said.
"If we provide arms and ammunition, then we are in the fight. We don't want that."
Ukrainian lawmakers voted Thursday to reinstate military service in the country. Until it was dropped last year, it was compulsory for all males in Ukraine.
Lawmakers have now voted to bring it back because of what has been termed "Russian aggression." The legislation must still be signed off by the acting President.
Since Yanukovych's ouster, Kiev's interim government has faced a wave of protests in the predominantly Russian-speaking east.
Pro-Moscow protesters took over government buildings in several cities.
And when Ukraine's armored vehicles rolled Wednesday, its attempt to take back eastern towns from pro-Russian militants seemed to stall.
In Donetsk, six armored vehicles sent into the nearby city of Kramatorsk in the morning later showed up carrying Russian flags in Slaviansk.
Russian Ambassador to the EU Vladimir Chizhov told CNN's Christiane Amanpour those Ukrainian soldiers "preferred to switch sides and join the people."
Ukraine's Defense Ministry said the vehicles had been seized by militants.
Separately, in a reply to a letter from Putin in which he warned of gas supply disruption, the European Union said it was willing to hold talks with Russia and Ukraine on gas security.
"We believe that this approach allows for the most useful process with the Russian Federation and other third parties," European Commission President Jose Manuel Barroso said in his reply, released by the commission.
Russia supplies 30% of Europe's gas needs. It has threatened to cut off supplies to Ukraine because of debts.
Nick Paton Walsh reported from Donetsk, Ukraine. Marie-Louise Gumuchian and Laura Smith-Spark reported and wrote from London. CNN's Frederik Pleitgen, Arwa Damon, Kellie Morgan, Claudia Rebaza, Barbara Starr, Radina Gigova and Alex Felton and journalist Azad Safarov also contributed to this report.