Ukraine's president, Viktor Yanukovych, accepted the resignation of his prime minister and government on Tuesday, in an apparent concession to the opposition and to demonstrators who have taken to the streets to protest against his rule.

In a decree Yanukovych said he had accepted the resignation of Mykola Azarov, a key ally and hardliner, and his cabinet of ministers.

Separately, Ukraine's parliament voted to scrap anti-protest laws that have provoked a violent escalation of the country's political crisis. A large majority of deputies voted in favour of revoking the legislation passed on 16 January. The move came after four rounds of talks between the embattled Yanukovych and three opposition leaders. The laws severely curtailed freedom of assembly, with critics suggesting they in effect ushered in a dictatorship.

"We revoked the laws against which all the country has revolted," Arseniy Yatseniuk, a prominent opposition leader, said after the vote. He called on Yanukovych to immediately sign the repeal of the legislation into law.

Mykola Azarov offered to resign as Ukraine's prime minister in the spirit of 'social-political compromise'. Photograph: Denis Balibouse/Reuters

Azarov, who has described protesters as "terrorists", had earlier offered his resignation. He said he hoped the move would help achieve a peaceful resolution to the crisis that has gripped the country for two months. "The conflict situation which has come about in the country is threatening the economic and social development of Ukraine, creating a threat to the whole of Ukrainian society and to each citizen," he said.

The opposition responded cautiously to Azarov's resignation, saying it was unclear who would replace him. Russia, meanwhile, piled further pressure on Yanukovych by announcing that it might not fulfil its pledge to pay a £9bn bailout to Ukraine if the government falls, the Wall Street Journal reported, citing Russian government sources. The money is desperately needed to keep Ukraine's struggling economy afloat.

One former Ukrainian foreign ministry official said that the Kremlin was exerting massive pressure on Yanukovych behind the scenes, and had been urging him to deal more harshly with anti-government protesters. "Ukraine is out of money. If Russia stops financing Yanukovych he will be unable to pay his loyal supporters in the east," the official said.

It was Yanukovych's decision to accept Russian money – and to reject a partnership agreement with the European Union – that first prompted massive pro-European street demonstrations two months ago. Radical groups have since joined the protests, which have seen violent clashes, at least four civilians killed and parts of central Kiev transformed into a battle zone. Dozens of activists have been arrested and several prominent leaders have disappeared. Over the weekend the government mooted the idea of imposing a state of emergency.

On Tuesday opposition leaders said they would not abandon their uprising until their key demands were met. The demands include Yanukovych's resignation, fresh presidential elections, and an amnesty for those rounded up by police in street protests.

Vitali Klitschko. Photograph: Zurab Kurtsikidze/EPA

"It's not a victory. It's just a step towards victory," Vitali Klitschko, leader of the UDAR party and former world boxing champion, said of Azarov's resignation. Klitschko also reaffirmed his wish not to work in a new cabinet. Yatseniuk had earlier turned down an offer by Yanukovych to become his prime minister. "Under no circumstances will I ever agree to work in Yanukovych's government," Klitschko said, adding that a change of prime minister would not change the government system, which needed "to get a restart".

Elmar Brok, a German member of the European parliament and the current chairman of the European parliament committee on foreign affairs, hailed Azarov's resignation and the determination of the ruling party to revoke the controversial laws, calling it "a very important step".

But pro-Yanukovych politicians did not support the exit of Azarov, who has been head of the government since 2010, when Yanukovych took power. "This will lead to additional destabilisation in the country," said Oleg Tsariov, of the ruling Party of Regions, adding that if Yatseniuk took up the post he would be ready to go into opposition himself.

A protester uses a laptop at barricades. Photograph: Thomas Peter/Reuters

The politicians will vote later in the day on an amnesty for hundreds of protesters arrested for participation in anti-government protests across the country.

But it was doubtful that the decisions taken in parliament would placate the tens of thousands of protesters and prompt them to leave the streets and destroy dozens of barricades that protect the Kiev protest camp, now known as Euromaidan, from thousands of police. "I'm sure our fight will go on," said Klitschko.

Read more

• Yanukovych's future may depend on oligarchs as much as protesters

• Andrey Kurkov: my Kiev home is now a war zone. But I'm not quitting