Finns headed to the polls Sunday to cast their votes for president, and after a close race, ex-Prime Minister Alexander Stubb of the center-right National Coalition Party narrowly ousted liberal Green Party member Pekka Haavisto.

Stubb, a former prime minister, declared himself the winner in the run-off vote after netting 51.6% of the votes to Haavisto’s 48.4%, after 99.7% of the ballots had been counted, Reuters reported.

As president, Finland’s new head of state will take on issues like the country’s security and foreign policy, as well as its stance toward Russia, which it shares a border with.

Stubb is pro-European and has strongly supported Ukraine while taking a tough stance against Russia.

FINLAND PRESIDENTIAL CANDIDATES COMPETE TO SHAPE COUNTRY'S FOREIGN AND SECURITY POLICIES INVOLVING RUSSIA

Alexander Stubb

National Coalition Party (NCP) presidential candidate Alexander Stubb reacts at his election reception in Helsinki, Finland, on February 11, 2024. Finns cast their ballots Sunday in presidential elections with two seasoned politicians facing off for the role that has gained importance in light of the countrys NATO membership and rising tensions with neighbouring Russia. (Photo by EMMI KORHONEN/Lehtikuva/AFP via Getty Images)

The presidential victor said in televised comments that he considered his win "the greatest honor" of his life.

"The feeling is calm, humble but, of course, at the same time, I am extremely happy and grateful that the Finns in such large numbers have voted and that I get to serve as president of the Republic of Finland," Stubb said.

Finland headed into a runoff presidential election after Stubb won the first round with 27.2% of the votes, as widely predicted.

FINLAND EXTENDS CLOSURE OF RUSSIAN BORDER, SAYING MOSCOW HASN'T STOPPED SENDING MIGRANTS

Finland Politics President Stubb

National Coalition Party (NCP) presidential candidate Alexander Stubb (L) and Green Party backed candidate for a nonpartisan constituency association Pekka Haavisto react during an election night event at the Helsinki City Hall in Helsinki, Finland, on February 11, 2024. (Photo by HEIKKI SAUKKOMAA/Lehtikuva/AFP via Getty Images)

The president of Finland holds executive power in formulating foreign and security policy, while also commanding the military. The president largely keeps himself removed from domestic politics.

Stubb is described as a liberal conservative, compared to Haavisto, who is an environmentalist with center-left views. Both candidates, though, took similar stances when it came to foreign policy issues, including Russia and helping Ukraine.

Haavisto congratulated his opponent on Sunday, calling Stubbs "the 13th president of Finland."

FINLAND PREPARES FOR PRESIDENTIAL ELECTION RUNOFF FEATURING FORMER PRIME MINISTER AND EX-TOP DIPLOMAT

Stubb hugs

National Coalition Party (NCP) presidential candidate Alexander Stubb (C-R) and Finland's Prime Minister Petteri Orpo (C-L) hug after advance voting results are revealed at his election reception in Helsinki, Finland, on February 11, 2024. (Photo by EMMI KORHONEN/Lehtikuva/AFP via Getty Images)

"I believe Finland now gets a good president for the republic," he said. "Alexander Stubb is an experienced, competent person for the job. No more babble."

The election results mark a new period for Finland, after decades of electing presidents who fostered diplomacy with Russia and chose not to participate in military alliances so it could cool tensions between NATO and Russia.

After Russia invaded Ukraine in 2022, the country changed its stance and joined NATO in April 2023.

CLICK TO GET THE FOX NEWS APP

Stubb will replace Sauli Niinisto, who, after two six-year terms, is retiring.

Niinisto was called "the Putin Whisperer" because of his close relationship with the Russian leader.

Reuters contributed to this report.