Parliamentary elections on Sunday are extremely tight among the three biggest parties, with the prime minister’s Social Democrats in a tough fight to lead the next government.At a recent campaign rally in her hometown, Tampere, Finland, Prime Minister Sanna Marin defended her time in office and tore into the rising right-wing populist Finns Party, which opposes immigration and is fiercely critical of the European Union.Ms. Marin remains remarkably popular after governing for three and a half years, through the pandemic, the war in Ukraine and Finland’s rapid decision to join NATO — despite her assurance only a month before Russia invaded that Finland would never join the alliance on her watch.But with most Finns now focused on other matters, particularly inflation and rising public debt, she is at risk of losing her job in Sunday’s parliamentary elections. Finland’s three biggest parties are essentially tied in the polls, and the mood of the country seems to be swinging rightward, which has been a trend in Europe in partial reaction to the economic costs of the pandemic and the Ukraine war.“The main criticism of Sanna Marin is her economic policy,” said Johanna Vuorelma, a political scientist at the University of Helsinki. “The image is one of spending too much.”Ms. Marin, who is more popular than her party, which is lagging, favors economic growth, high employment — Finland is currently at around 75 percent in employment — and taxation polices that include closing loopholes that favor the wealthy.But she has refused to specify budget cuts despite the public concerns over growing government debt at a time when the cost of living is rising and inflation is high.She has tried to deflect attention from economic policy by emphasizing broader issues. “These elections are about value choices, about what kind of future you’ll vote for,” Ms. Marin said to a friendly crowd in her own constituency. And she emphasized her center-left government’s support for Ukraine and NATO, saying: “Russia must be stopped in Ukraine!” Ukraine, she said, “is fighting for all of us.”Ms. Marin speaking at a campaign rally for her Social Democratic Party in her hometown, Tampere, Finland, this month. She is seen by some as out of step with Finnish sentiment, refusing to talk about budget cuts and debt.Mika Kylmaniemi/Lehtikuva, via ReutersMs. Marin, 37, is the closest thing Finland has ever had to a political rock star. She is known globally for her strong words about defending Ukraine and for her off-duty pleasures, too, having been caught on private videos partying with her friends, creating a controversy in socially conservative Finland.The current center-left government, led by Ms. Marin’s Social Democrats, is a coalition of five parties, including the Center Party, the Greens, Left Alliance and Swedish People’s Party.But the three traditional parties — the Social Democrats, the National Coalition Party and the Center — have been losing ground to smaller, more ideologically focused parties, particularly the Finns, who even four years ago came second, winning only one seat fewer than the Social Democrats.Taru Veikkola, who works at the University of Helsinki, is thinking of voting for the Finns Party. “This government has used money carelessly,” she said. “Sanna Marin talks in a roundabout way, about everything and about nothing in particular. You can listen to her for 20 minutes and wonder, ‘What did she say?’”At this point, seemingly any coalition to emerge from the vote will almost surely include the center-right National Coalition Party. It is one of only two parties in Parliament headed by a man, Petteri Orpo, 53, and holds a very slight lead, with 19.8 percent of the vote in a poll released Thursday by the state broadcaster Yle. The Finns Party, led by Riikka Purra, 45, is close behind, with some 19.5 percent, while Ms. Marin’s Social Democrats have slipped to 18.7 percent.But the margin of error is 2 percent, so the race is essentially even.Ms. Marin, with Riikka Purra, chairperson of the Finns Party, left, and Petteri Orpo, chairperson of the National Coalition Party, at an election debate in Helsinki on Wednesday.Markku Ulander/Lehtikuva, via Agence France-Presse — Getty ImagesWhile Mr. Orpo has refused to say which party he would prefer to align with in government, Ms. Marin and some of the smaller leftist parties in her coalition have ruled out any deal with the Finns, said Jenni Karimaki, a political scientist at the University of Helsinki.The Finns are fiercely anti-immigration, and they favor Finland leaving the European Union eventually.At the rally in Tampere, Ms. Marin said: “The Finns Party’s alternative is to turn inward, to shut themselves out of international cooperation, to leave the European Union at some time in the future. The Finns Party doesn’t offer anything good to Finnish people.”Still, the party has proved surprisingly popular among younger voters. Analysts say that they are also gaining votes by promising to slow down Finland’s commitment to becoming carbon neutral by 2035.“I can’t remember an election this exciting,” said Veera Luoma-aho, political editor of the Helsingin Sanomat newspaper. Any of the three leading parties could win, she said, noting that around 40 percent of Finns have already cast a ballot — designated polling places allow early voting — in an election that is expected to have a high turnout.“This election has been about the economy, people’s own wallets, but also about government debt and energy politics, quite traditional left-right issues,” she said. But with the Social Democrats having refused to identify any significant spending cuts, she added, “maybe their economic program is not credible for some voters, and some voters may think she’s even too aggressive.”In televised debates, Ms. Marin has concentrated her fire on Ms. Purra and the Finns, while emphasizing issues of social welfare and education. “She’s not trying to attract voters from the middle, which is quite surprising,” Ms. Luoma-aho said. “She’s trying to inspire the left.”She is also criticized for speaking so openly about foreign and security policy, which is traditionally discussed privately with Finland’s powerful and immensely popular president, Sauli Niinisto. “This is a very delicate, sensitive issue with a neighbor like Russia,” Ms. Vuorelma said. “So she is seen as breaking from this particular tradition, and she says we have to change the way we talk about these issues and talk about them in public.”Ms. Marin with President Volodymyr Zelensky of Ukraine, during her visit to Kyiv this month. She is known for her fierce backing of Ukraine.Alina Yarysh/ReutersA recent example was Ms. Marin’s apparent promise this month in Kyiv that Finland would consider sending some of its older fighter jets, American-made F/A-18 Hornets, to Ukraine. She had not discussed the matter with Mr. Niinisto or her foreign and defense ministers, and any such move would require American permission. She later walked that back, saying that “no one promised Ukraine Finnish Hornet jets.”Among the participants at her election rally, most expressed support. But there was some criticism, too.Pekka Heinanen, 59, said that the government had a lot of crises to deal with, but that “an awful lot of money got spent that could have been spent on other things.” Ms. Marin is charismatic and a celebrity, he said, “But she’s still a bit like a foal in the field, there’s too much excitement.”He mentioned the Hornets, saying that she spoke “without having studied the background of the question.” Still, he said, “everybody makes similar mistakes.”Campaign posters for the Social Democrats, center and right, and the Finns in Espoo, Finland, on Wednesday.Heikki Saukkomaa/Lehtikuva, via ReutersNoora Kivinen, 24, and Jasmin Harju, 25, both voted early, but neither of them for Ms. Marin. Ms. Kivinen voted for the Greens and Ms. Harju voted for a different Social Democratic candidate in the Finnish system of proportional representation in multiparty constituencies, where numerous candidates from the same party can run.Still, Ms. Harju said she hoped the Social Democrats would be re-elected. “Looking at the prime ministers of recent years, she has done the best, when one thinks that there was a pandemic, a war and other crises.”Ms. Kivinen said that “she could have handled social welfare and health care questions better than she did,” especially early in the pandemic. “But you can’t say that she did something wrong when it was a new situation for everyone.”But neither woman had much patience for the controversies over Ms. Marin’s partying in her free time. “Male prime ministers have also fooled around,” Ms. Harju said. “That whole thing was overblown. To see that she makes similar mistakes as everyone makes her human.”Given the tight race and the gradual fragmentation of the large parties, forming a new governing coalition may take some time and could well require more than three parties to build a majority in Parliament, said Markku Jokisipila, a political scientist at the University of Turku.If the Social Democrats do not form the next government and Ms. Marin is no longer prime minister, there is a lot of speculation about her future. Would she run for president or take a job in Brussels? Neither alternative interests her, she told Mr. Jokisipila this month. But there are also rumors she might succeed Jens Stoltenberg as NATO secretary general.“There is wild speculation around her in Finland right now,” Mr. Jokisipila said. Given her prominence, that is bound to continue. More