The centre-left Social Democratic Party has declared victory in Finland's parliamentary election, with an anti-immigration party taking second place.
Finland's leftist Social Democrats won a razor-thin victory in Sunday's general election, holding off the far-right Finns Party which surged on an anti-immigration agenda.
With 100 percent of ballots counted, the Social Democrats, led by 56-year-old former trade union boss Antti Rinne, picked up 40 seats in parliament, after campaigning on a ticket of fierce opposition to the austerity imposed by the previous centre-right government of Prime Minister Juha Sipila.
Meanwhile the Finns Party, which won 39 seats, had focused almost entirely on an anti-immigration agenda under the leadership of hardline MEP Jussi Halla-aho, who also decried the "climate hysteria" of the other parties.
Only 0.2 percentage points separated the two parties -- in a heavily splintered political landscape where the Social Democrats were the biggest party with 17.7 percent of votes.
They will head a government for the first time in 16 years, though it has been a junior coalition member since then.
"For the first time since 1999, the Social Democratic Party is the party of the prime minister," leader Antti Rinne told supporters, after his party picked up 40 seats in parliament, one more than the Finns Party.
The close result will make negotiations to form the next coalition government particularly fraught.
Surge of support for anti-immigration Finns Party
The Finns Party has seen a surge in support in recent months, urging people to "Vote for some borders" and pledging to reduce Finland's asylum intake to "almost zero".
It more than doubled its presence in parliament, from 17 seats to 39, and regained all of the ground it lost when more than half of Finns Party MPs fled the party in 2017 on the election of hardline leader Jussi Halla-aho.
Finns Party leader Halla-aho has sought to dispel accusations that he hoped to keep his party in opposition after the election, so as to avoid facing the tough decisions of being in power.
On Sunday he said his party was open to being in a coalition "but not at any cost".
The Finns Party does have previous experience of being in government, when they became the second-largest party in the 2015 election.
But that led to the group splitting acrimoniously when its popularity spiralled following unpopular compromises on immigration and EU bailouts.
The hardline faction, led by Halla-aho, went into opposition in 2017, and the party took a further lurch to the right.
Negotiations underway to form coalition government
Finnish governments are typically a coalition of three or four parties that form the minimum 101-seat majority in parliament.
The Social Democrats' Antti Rinne has previously said his party would find it "very difficult" to enter a coalition with the Finns Party.
But after declaring victory on Sunday, Rinne did not rule out a collaboration, saying he "has questions" for the party.
"Some of the questions will be about values," Rinne told Finnish media. "The Social Democratic Party's values are very important, it's the glue that will hold the government together."
Rinne could also choose to form a coalition with the conservative National Coalition party, which came in third with 38 seats.
Although the two parties have repeatedly clashed over the conservatives' austerity policies during the last four years, political commentator Sini Korpinen told AFP the pair would more than likely choose to collaborate in order to keep the Finns Party in opposition.
"It's very hard to see that the other parties would say no to the Social Democrats, because then we would be in a situation with Halla-aho trying to form a government and I just don't see that happening," Korpinen said.
Outgoing Prime Minister Juha Sipila said his Centre Party was the election's "biggest loser", blaming the "difficult economic decisions" his administration made in an attempt to rebalance the economy after a long slump.
Voter turnout of 72 percent was higher than the 70.1 percent who voted in 2015.
The current government's cuts to Finland's prized education system, and a tightening of unemployment benefit criteria, had provoked loud and widespread public opposition.
Rinne has been a staunch opponent of the National Coalition's austerity policies over the past four years.
And Petteri Orpo, leader of the conservative National Coalition Party and co-architect of the government's savings programme, has denounced the Social Democratic Party's anti-austerity plans as "irresponsible".
However, in a tacit acknowledgement that the public mood was against further belt-tightening, Orpo has insisted that the economy is now strong enough to allow for some more generous public spending.
Finland results monitored ahead of European Parliament election
With the European Parliament election less than two months away, the Finnish ballot is being watched in Brussels.
At stake in Finland is the future shape of the country's welfare system, a pillar of the Nordic social model, which the leftists want to preserve through tax hikes and the centre-right wants to see streamlined because of rising costs.
Underscoring a growing confidence among far-right politicians in Europe, anti-immigration parties, including the Finns, have announced plans to join forces after the May 26 EU election in a move that could give them a major say in how the continent is run.
Additional reporting: Reuters