Ukraine's parliament has ratified an agreement that will integrate the country with the European Union – the same document which the former president Viktor Yanukovych backed out of signing last year, leading to protests that ended in revolution.

Yanukovych's downfall was met with the Russian annexation of Crimea and a Moscow-backed insurgency in east Ukraine that has cost 3,000 lives in recent months. After peace talks between Ukraine's president, Petro Poroshenko, and Russia's president, Vladimir Putin, earlier this month, the Ukrainian parliament also passed legislation on Tuesday to grant wide-ranging autonomy to the eastern regions. The deal, which many Ukrainians see as a capitulation, will be hard to sell to the populace.

The parliament also voted on a key law on "lustration" that will allow public officials with corrupt pasts to be dismissed from their posts and put on trial.

The voting on the EU deal was synchronised with the European parliament by video, and was met with a standing ovation and the national anthem in Kiev. Poroshenko called it a "first but very decisive step" to moving Ukraine closer to Europe.

"Since world war two, not a single nation has paid such a high price for their right to be European," he said. "Tell me please who will now dare close the doors of Europe in front of Ukraine? Who will be against giving us the prospect of membership in the EU towards which we are making the first yet very decisive step today?"

The mood was more sombre over the bills aimed at peace in eastern Ukraine. More than 3,000 people, the majority of them civilians, are believed to have died since Russia-backed rebels began taking over cities in east Ukraine, in protest at the new western-oriented government in Kiev.

Ukrainian authorities responded by sending in the army and volunteer battalions to quell the revolt, but their advance was stopped in recent weeks when a rebel surge apparently backed by regular Russian army forces turned the tables. Kiev feared if it had continued on the battlefield, it could have lost even more territory.

Poroshenko said the compromise solution of increased autonomy for the east for three years – essentially forgoing Kiev's control – was the only way to make peace. A bill was also passed during a closed session of parliament that will give amnesty to those fighting against Kiev in the east, people whom the government has repeatedly referred to as "terrorists".

"There is no task more important for us now than peace," he said. But critics slammed both bills, which were passed with small majorities, and called them a capitulation to the Kremlin's aggressive tactics in Ukraine.

"This is the full-scale concession of Ukraine's interests in Donbass … The decision legalises terrorism and the occupation of Ukraine," said Yulia Tymoshenko, the former prime minister.

Andry Sadovy, mayor of the western city of Lviv, wrote on his blog that while he supports giving more authority to the local governments, the special status for areas controlled by separatists involves the legitimisation of "those guilty of deaths of thousands of Ukrainians".

Government officials said Poroshenko had no choice. Anton Gerashchenko, adviser to the interior minister, wrote on Facebook that many points of the laws "would make the hair stand on end for every Ukrainian patriot", but said that if they had not passed the laws then "Russian tank columns" would go on to take other Ukrainian cities. On Tuesday, Russia announced it would send more troops to newly annexed Crimea, apparently in response to joint military exercises between Nato countries and Ukraine in western Ukraine.

In the east, a ceasefire agreed to 10 days ago has been kept in places, but there is intense shelling in the eastern city of Donetsk, where rebels have repeatedly fired at the airport, a Ukrainian army position, prompting a response. On Tuesday, Donetsk city council said three people had died overnight from shelling, and five were wounded.

Rebels in Donetsk have said they will only accept full independence from Kiev, but it is believed that the Kremlin's preferred solution is to have east Ukraine as a "breakaway" region that is technically part of Kiev but can be governed with strong influence from Moscow.

Russia has also opposed Ukraine's trade deal with the EU, saying it will be economically disastrous for both countries, given how closely the Ukrainian market is linked with Russia. The EU and Ukraine agreed last week to delay a reduced-tariff regime that makes up part of the deal for a year, in a move seen as another big concession to Russia.