BRATISLAVA (Reuters) - Long-serving Slovak Prime Minister Robert Fico resigned on Thursday, passing his government to a deputy after the murder of an investigative journalist provoked the country’s biggest protests since the fall of communism.

Outgoing Slovak Prime Minister Robert Fico speaks after tendering his resignation to the president as his successor Peter Pellegrini looks on, at the Presidential Palace in Bratislava, Slovakia, March 15, 2018. REUTERS/David W. Cerny

President Andrej Kiska asked Deputy Prime Minister Peter Pellegrini to form the next government, opening the way for the three-party coalition to stay in power even though tens of thousands of Slovaks are demanding early elections.

The unsolved killing of 27-year-old reporter Jan Kuciak, who delved into fraud involving businessmen with political connections, has fueled public anger over corruption and threatened to bring down the coalition before the party leaders agreed a change of guard.

Fico vowed on Thursday to remain in politics as the active leader of his Smer party.

Pellegrini presented the president with a list of signatures showing coalition lawmakers supported the switch in prime ministers, guaranteeing a parliamentary majority.

But Pellegrini, a former speaker of parliament, will face his first test already on Friday as the protests are scheduled to continue into a third week. Organizers are demanding new elections and a thorough investigation of Kuciak’s murder in late February.

The events of the past few weeks have also exposed growing unease in some central European countries that governments may be backsliding on democracy almost 30 years after communism was pushed out of the region.

President Kiska himself had urged a government shake-up or snap elections to restore public trust.

“After two weeks of international shame, a denial of political responsibility and mass protests, we are back at the start, at a government resignation and change of prime minister,” Kiska said before Fico tendered his resignation to him.

Slideshow ( 6 images )

Fico had promised to step aside if Kiska allowed Smer, the biggest coalition party, to pick his successor.

The government will continue with Smer, the Most-Hid party which represents the ethnic Hungarian minority, and the Slovak National Party that has shifted to center in recent years from the far right.

Fico will stay on as caretaker prime minister until his successor is officially named.

Kiska and Fico were opponents in the last presidential run-off vote and have battled again in the crisis. Fico has accused outside forces of trying to destabilize the country and questioned Kiska’s meeting last year with financier George Soros, echoing attacks on the Budapest-born billionaire by Hungarian Prime Minister Viktor Orban.

NOT GOING AWAY

Protesters are also taking to the streets in the neighboring Czech Republic, a fellow member of the European Union and NATO. Thousands demonstrated last week against a Communist Party lawmaker being voted chairman of parliament’s police oversight commission despite his past as a riot policeman before the 1989 Velvet Revolution.

Thousands of Poles also protested last year against an overhaul of the judiciary that has put the right-wing government in Warsaw in dispute with Brussels over safeguarding the rule of law.

Fico has been the dominant figure in Slovak politics for over a decade, and despite keeping an anti-immigration line with central European neighbors has been trying to stand out from more euroskeptic leaders in the region. Last year, he called Slovakia a “pro-European island” in central Europe.

He said he was not finished. “I told the president: rest assured, I’m not leaving politics, I want to be an active party leader,” he said.

Slovakia’s economy has grown rapidly in the last decade and the country is a major car producer despite its small population of 5.4 million. But many accuse Fico of not clamping down harder on corruption and cronyism.

Just before he was found shot dead along with his fiancee at his house outside of Bratislava, Kuciak had been looking into suspected mafia links of Italians with businesses in Slovakia.

In his final report published after his death, Kuciak said one of the Italians had past business links with two Slovaks, including a former model, who later worked in Fico’s office. Both have resigned but deny connections to the murder. Their Italian former business partner has denied having connections with the mafia.

No one has been charged over the killing.