BRATISLAVA, Slovakia -- Slovak Prime Minister Robert Fico and his government resigned Thursday as a way out of the political crisis triggered by the slayings of an investigative journalist and his fiancee.

President Andrej Kiska accepted the resignation and asked Peter Pellegrini, Fico's deputy prime minister, to form a new government. The move is meant to keep the current three-party coalition in power and avoid the possibility of an early election.

"I'm sure that a decision to create a new government is the right step," Fico said. "An early election would not bring any stability."

Fico, who has led three Slovak governments in recent years, said he had no plans to leave politics.

"I'm not going anywhere," Fico said. "I want to be an active chairman of a political party."

His resignation came after tens of thousands of Slovaks joined anti-government protests across the country last week to demand the government's resignation and a thorough investigation into the shooting deaths of Jan Kuciak and Martina Kusnirova.

Kuciak was writing about ties between the Italian mafia and people close to Fico when he was killed. The reporter also wrote about corruption scandals linked to Fico's leftist Smer Social Democracy party.

The protests were the biggest in Slovakia since the 1989 anti-communist Velvet Revolution. More demonstrations are scheduled for Friday despite's Fico's move, said organizers who want to see a new election.

"We have a historic chance to start ridding Slovakia of corruption," they said in a statement.

Pellegrini, who also is from the Smer Social Democracy party, will form the same coalition as the previous government -- with the Most-Hid party representing ethnic Hungarians and the ultranationalist Slovak National Party. The coalition has a majority in the 150-seat Parliament, holding 79 seats.

Pellegrini said he planned some changes to the government but gave no details.

Earlier this week, the Most-Hid coalition party called for holding an early election but the party leadership changed its mind after Fico offered his resignation.

Slovakia's next regular general election is due in 2020.