But the closest competition for President Niinisto came from Pekka Haavisto, a gay, left-wing Green who reached a second round against Mr. Niinisto in 2012 — a campaign that enchanted liberal-minded celebrities and electrified younger voters, especially in Helsinki.
This time, Mr. Haavisto’s aura had partly vanished, as had a number of the celebrity campaigners. Some political observers suggested that Mr. Haavisto was running with an eye on the 2024 election, reluctant to challenge Mr. Niinisto head on because of the incumbent’s popularity after a largely error-free first term.
Sini Mononen, a cultural critic at the University of Turku, said that Finns also no longer considered a gay candidate a novelty, after significant legal changes in favor of gay rights over the last few years.
Disappointment also lay in store for Paavo Vayrynen, a figure whom Finland’s political establishment has repeatedly consigned to the history books, only to see his hopes resurrected. This was Mr. Vayrynen’s fourth bid for the presidency, and for the campaign he adopted a nativist, euroskeptic approach similar to Ms. Huhtasaari’s. He drew over 6 percent of the vote, which he called “an awesome result.”
Other candidates, including that of the Social Democrats, the party of Mr. Niinisto’s predecessor, got less than 5 percent.
Mr. Niinisto has laid out a cautious vision for his next term.
“President Niinisto will continue with his moderate and diplomatic but NATO-friendly foreign policy, indirectly reinforcing the hegemony of the National Coalition Party,” predicted Heikki Patomaki, a political scientist at the University of Helsinki.
Turnout — at 69.9 percent, lower than expected for this Nordic nation — is higher for presidential than parliamentary elections here. Yet while the president remains active in foreign policy, including holding the chairmanship of the Arctic Council since May 2017, presidential power over domestic policy has ebbed steadily since the final throes of the Cold War.
Also returning to office will be Lennu, Mr. Niinisto’s celebrity first dog, whose absence from the stump was one of the few mysteries of the campaign. Now aged 7, the Boston terrier might well lose some of the limelight with the birth of the president’s first child with his wife, Jenni Haukio, 40, a poet. Their baby is expected in February.
A month later, two pandas will be on display in Finland, a diplomatic gift from China. Since President Xi Jinping’s state visit last year, Mr. Niinisto has expressed openness to bolstering ties with China, despite his reservations over human rights conditions there.