A coalition of centre-right opposition parties in Slovakia has won enough seats to unseat the current government.
With almost all votes counted, Prime Minister Robert Fico's leftist Smer party has just over 35%, enough to gain 63 seats in the 150-seat parliament.
But three conservative parties and an ethnic Hungarian party are set to win 78 seats.
However, Mr Fico said that he would still try to form a government, as leader of the largest single party.
Referring to his party's 63 seats, he said: "This is a number that gives us the right to accept a mandate from the president to form a cabinet. We are ready for that."
Growing public debt and a political fund-raising scandal affected Smer's popularity, analysts say.
Slovakia's worsening ties with Hungary also dominated the election campaign.
Turnout in the election was 58.7%.
Six parties gained enough votes to cross the 5% threshold required to take seats in parliament.
The liberal SDKU has an austerity programme to tackle the effects of the global economic crisis on Slovakia.
"The main challenge for Slovakia is to stop the increase of the debt, to start economic development - Slovakia was once called the European tiger and we need to recover that," said SDKU leader Iveta Radicova, who could now become the country's first woman prime minister.
"The citizens of Slovakia have voted for responsibility," she added.
With partners Freedom and Solidarity, the Christian Democrats and an ethnic Hungarian party Most-Hid, her party has enough seats for a parliamentary majority.
The Slovak National Party, currently a coalition partner for Mr Fico's Smer, just cleared the 5% threshold to take nine seats, giving the prime minister a coalition total of 72 in parliament.
But another coalition member, the nationalist HZDS of former hardline Prime Minister Vladimir Meciar, failed to enter parliament.
Mr Fico had to battle allegations of sleaze during the election campaign.
Earlier this month, a national newspaper published what it said was a recording of Mr Fico discussing improper party fund-raising.
Mr Fico said the audio was fake and is suing the SME daily's editor-in-chief.
In a television address shortly before polls opened, Mr Fico said that thanks to the underhand practices of his political opponents, the election would be undemocratic and manipulated.
Opposition parties denied allegations of illegal smear tactics.
"Any mash-up is better than Fico," said SaS leader Richard Sulik, saying his party would consider any coalition which would unseat the current prime minister.