US, Russia, Ukraine and EU agree measures including end of violence, disarming of illegal groups and amnesty for protesters

The US, Russia, Ukraine and the European Union have reached agreement on a series of immediate steps aimed at pulling eastern Ukraine back from the brink of war.

The deal, clinched after a dramatic extended meeting in Geneva, calls for the disarming of all illegal groups. In the next few days they would have to vacate all the government buildings and public spaces they have occupied over the course of the crisis.

In return, the protesters in eastern Ukraine would be offered amnesty for all but capital crimes and the government in Kiev would immediately start a process of public consultation aimed at devolving constitutional powers to the provinces.

The Organisation for Security and Co-operation in Europe (OSCE) will be given the job not only of making sure the agreement will be put into practice but also of helping to implement it. The US, Russia and European countries would provide monitors to beef up the OSCE's manpower, which would be given access across Ukraine.

Barack Obama cautiously welcomed the talks, describing the agreement endorsed by the four parties as a "glimmer of hope". But he insisted Russia still needed to see through its commitment to calming tensions in Ukraine, adding: "We're not going to count on it until we see it."

He said it would be "several days" before the agreement forged between the US, EU, Ukraine and Russia could be judged. "I don't think we can be sure of anything at this point," he said. "There is the possibility, the prospect, that diplomacy may de-escalate the situation and we may be able to move toward what has always been our goal, which is let the Ukrainians make their own decision about their own lives.

Speaking after the deal was agreed, the US secretary of state, John Kerry, made it clear that the US would hold Russia accountable for the compliance of the pro-Russian protesters in eastern Ukraine.

"Responsibility will lie with those who have organised their presence, provided them with the weapons, put the uniforms on them, supported them, and have been engaged in the process of guiding them over the course of this operation," Kerry said, adding that the US had "made very clear that Russia has a huge impact on all those forces. And we have made clear what the evidence is."

A planned escalation of US sanctions on Russia would be suspended pending Russian compliance "over the weekend".

Foreign secretary William Hague also welcomed the commitments: "The steps contained in the joint agreement offer a route for de-escalation. But rapid implementation of the agreement is critical, particularly the commitments by Russia that all illegally armed groups must be disarmed, all illegally seized buildings must be returned to legitimate owners, and all illegally occupied streets, squares and other public places in Ukrainian cities and towns must be vacated."

The Geneva meeting, which brought together Kerry, the Russian foreign minister, Sergei Lavrov, Ukrainian counterpart Andrii Deshchytsia and the EU foreign policy chief, Catherine Ashton, began with low expectations as clashes across eastern Ukraine between government forces and armed protesters intensified. At least one demonstrator was killed when pro-Russian protesters tried to storm a military base in the town of Mariupol. It was expected that the talks would only last a couple of hours, and a room was prepared for Lavrov to talk to the press at midday, raising concerns he might walk out of the negotiations.

In the end, however, intense talks went on for seven hours, leading to the agreement, intended "to de-escalate tensions and restore security for all citizens".

The deal has five main points:

• All sides refrain from violence, and reject expressions "of extremism, racism and religious intolerance, including antisemitism".

• All illegal armed groups must be disarmed; all illegally seized buildings must be returned; all illegally occupied streets and other public places in Ukrainian cities and towns must be vacated.

• Amnesty will be granted to protesters and to those who have left buildings and other public places and surrendered weapons, with the exception of those found guilty of capital crimes.

• The OSCE would play a leading role in helping the authorities implement the agreement.

• Constitutional reform would be inclusive, transparent and accountable.

The agreement does not address the build-up of Russian troops on the Ukrainian border, nor the beefing up of the Nato presence on Russia's western border, announced on Wednesday by the alliance's secretary general, Anders Fogh Rasmussen.

Kerry said Russia had withdrawn one battalion from the border region and had said it would make further, bigger withdrawals as the Geneva agreement was implemented.

Kerry drew special attention to reports that antisemitic leaflets had been handed out to Jews in Donetsk, calling on them to register with the separatist authorities. The separatists denied responsibility.

Without specifically assigning blame, Kerry said: "In the year 2014, after all the violence and the journey of history, this is not just intolerable, it's grotesque. It's beyond unacceptable. Whoever is involved in these activities, wherever they crawled out of, there is no place for that."

Tensions continued to rise in the east between residents supporting and opposing the new Kiev government. Protesters gathered outside police headquarters in Stakhanov to demand the local police chief's resignation. They attempted to storm the building, but were reportedly repelled by residents who formed a human shield in front of the station.

On Thursday, hundreds gathered in Donetsk to demonstrate for Ukrainian territorial integrity. The rally ended peacefully, unlike similar demonstrations in previous weeks where pro-Russian protesters beat participants. Student Dima Balakai said he was there to oppose the Russian-backed "bandits" occupying the regional administration building.

"There are no violations against the Russian language here," he said, referring to pro-Russian protesters' tendency to blame Kiev for oppressing Russian speakers. "If I speak Ukrainian at the institute, they could soon kick me out."

He said he was beaten by a crowd of young men at a similar rally on 4 March.

Activists from the "people's republic" occupying the administration building went to Donetsk airport to demand negotiations with officials. They told the Guardian they wanted to prevent any military flights from landing, as well as ensure that Russian citizens could arrive freely. The Russian airline Aeroflot said the Ukrainian border service had placed an entry ban on Russian men aged 16 to 60. The Russian foreign ministry said it had requested more information from its Ukrainian counterpart, but journalists at Kiev's Borispol airport reported seeing Russian male passengers turned back.

Donetsk activists said such an entry ban has already been in place de facto in eastern Ukraine. Dima Prokopshuk said two friends from Russia whom he had invited to his recent wedding were turned back at the Ukrainian border three times even though they tried to enter from Crimea, Belgorod and Rostov-on-Don.