Slovakia's Prime Minister Robert Fico offered Wednesday to resign in response to calls for snap elections and criticism of his handling of a scandal over the killing of a journalist investigating political corruption.
"Today I have offered my resignation to the president of the republic" Andrej Kiska, Fico said in a public address. "If the president accepts it, I am ready to resign tomorrow."
Fico, 53, has been struggling since February to get on top of the scandal sparked by the killing of journalist Jan Kuciak and his fiancee.
He has come under heavy pressure from the opposition party, and also faced street protests in which tens of thousands of Slovaks demonstrated against the government.
The prime minister's ruling three-party coalition was facing a no-confidence vote by lawmakers scheduled for next Monday.
The liberal opposition party Freedom and Solidarity (SaS) had submitted the motion, arguing that "with Fico in government, an objective investigation into the double murder is impossible."
Interior minister Robert Kalinak had already resigned two days ago in a bid to save the government from collapsing.
But a minor member of Slovakia's three-way governing coalition, the Most-Hid party, raised the pressure further, calling for early elections.
Most-Hid's chief, Bela Bugar, said Wednesday evening that he "appreciated" Fico's decision and "hoped the situation will calm down".
Nevertheless, Fico laid down three conditions for his resignation.
President Kiska -- who had similarly called for early elections, or at least sweeping government changes -- should respect the outcome of the 2016 parliamentary elections; respect and uphold the coalition agreement that forms the basis of the current government; and accept that Fico's Smer-SD party would put forward a candidate to replace him, the prime minister demanded.
Fico has resisted the call for snap polls, warning the country could "plunge into chaos if the current opposition takes power".
Slovakian daily Sme reported that Fico's Smer-SD party may field deputy prime minister Peter Pellegrini, 42, as a candidate to succeed Fico.
Political analysts said that president Kiska had no other choice but to accept Fico's resignation.
The head of state "has himself called for a government shake-up," said Jan Baranek of the think-tank, Polis Slovakia.
"A new prime minister should calm things down to a certain extent," he said.
Grigorij Meseznikov, analyst at the Institute of Public Affairs in Bratislava, agreed.
"He shouldn't force someone to remain prime minister. On the other hand, he has to take into account the current government's slump in credibility."
It was up to Kiska to judge whether the current coalition was in a position to keep the government running, Meseznikov said, adding that "early elections would be the best solution."
A recent poll by the Focus institute found that 62 percent of Slovaks were in favour of Fico's resignation, while only 13 percent felt he should stay.
Fico is in his third term as prime minister and has been in power since 2012. He is known abroad for his anti-immigrant stance.
Kuciak and his fiancee Martina Kusnirova, both 27, were found shot dead on February 25 at their home near the capital Bratislava.
Police said Kuciak's death was "most likely" related to his investigation on ties between Slovakia's top politicians and Italy's 'Ndrangheta mafia.
The murder and Kuciak's article, published after his death, sparked a wave of anti-government sentiment in Slovakia, an EU and NATO member of 5.4 million people.
Fico's close aide Maria Troskova was alleged to have links to one of the Italians named in Kuciak's story.
The EU urged Slovakia to swiftly investigate the murder.
"The top priority for all of us must be to carry out an independent and thorough investigation of the facts and bring those responsible to justice," the EU's security commissioner Julian King told MEPs in Strasbourg on Wednesday.
"We call upon the Slovak authorities to do this quickly."
The killing of Kuciak and Kusnirova raised fresh concern about media freedom and corruption both in Slovakia and Europe.
It followed the assassination in October of investigative journalist Daphne Caruana Galizia who had denounced corruption in Malta.