Alexander Stubb is the new president of Finland

Finland's center-right former prime minister Alexander Stubb is set to become the next president after winning a runoff against rival Pekka Haavisto in the country's most closely contested presidential election in a generation.

Stubb of the National Coalition party announced his victory on the evening of February 11, and Haavisto, a former foreign minister and member of the Green Party who is running as an independent congratulated him.

After 99.4% of the votes were counted, Stubb had 51.6% of the vote against 48.4% for Haavisto. According to official data, almost half (about 46%) of voters who were eligible to participate in early voting did so.

Stubb, 55, said the role would be the "greatest honor" of his life. He added: "The task of the president of the republic is bigger than one person".

Shortly before 9:00 p.m. local time, after already trailing in early voting, Haavisto shook Stubb's hand, thanking him and wishing him "good luck in his work."

Stubb, 55, was born in Helsinki and has been a member of the European Parliament, a member of the Finnish Parliament, prime minister between 2014 and 2015, and a minister.

Outside of politics, he has worked as vice-president of the European Investment Bank and as a professor at the EU University in Florence and is a keen triathlete.

He has two grown children with his wife, British-Finnish lawyer Susan Innes-Stubb.

He will succeed two-term president Sauli Niinistö, who oversaw the country's accession to NATO. In the first round of the election two weeks ago, Stubb and Haavisto won 27.2% and 25.8% of the vote respectively, leading in a competition with nine candidates, including Jussi Hala-aho of the far-right Finns party, who finished third.

In the frenzied final days of the campaign, the candidates' personal lives and attitudes toward nuclear weapons came into focus. Haavisto, who is running to become the country's first green and first gay president, questioned why his sexuality has been in the spotlight in recent days.

The 65-year-old said he was surprised by the way his sexuality became a public focus in the second and final round and said journalists, particularly those from national TV channel Yle, had "provoked" discussion about this issue.

The Finnish president is the head of state, commander-in-chief of the army, and is responsible for foreign policy in cooperation with the government.

International security and defense are a top priority for Finnish voters amid accusations of Moscow instigating a "hybrid operation" on Russia's shared border with Finland, leading to the temporary closure of the entire border. Stubb described foreign policy and security as existential issues for Finland.

In Finland, the "existential threat" from Russia looms large - and a rescue from the US is far from certain. Earlier in the campaign he told the Guardian: "For Finland, foreign policy, security policy, is existential."

In addition to public debates about Haavisto's sexuality, nuclear weapons were also a central topic.

While Stubb supports allowing the transport of nuclear weapons through the country, Haavisto, who previously worked as a UN peace negotiator, wants to maintain the ban on nuclear weapons in Finland./BGNES