Russia and Ukraine a key point of contention between two leading candidates who went into the election neck and neck.
Polls closed at 10pm local time (20:00 GMT). Initial projections are expected soon, with official results meant to trickle in overnight.
It was a tight race for the largely ceremonial post, according to final opinion polls in the nation of 5.4 million people.
Korcok won the first round of voting last month after receiving 42.5 percent of the votes, while Pellegrini finished second with 37 percent. The two squared off in a decisive second round as neither won the minimum 50 percent at the time.
Korcok, 60, served as Slovakia’s foreign minister in 2020-2022, and before that as the ambassador to the United States and Germany. He was also the country’s envoy to NATO and the European Union. Korcok firmly supports Slovakia’s EU and NATO memberships.
Meanwhile, Pellegrini, 48, is a close ally of populist Prime Minister Robert Fico who is known for his pro-Russian policies.
Pellegrini heads the left-wing Hlas (Voice) party – that finished third in parliamentary elections last year – and favours a strong role for the state. His party joined a governing coalition with Fico’s left-wing Smer (Direction) party and the ultranationalist Slovak National Party.
Fico’s government, upon coming to power in September, immediately halted arms deliveries to Ukraine, prompting nationwide protests against its pro-Russian stance and several other policies.
Pellegrini currently serves as Parliament speaker and his victory would cement Fico’s power by giving him and his allies control of strategic posts.
Few executive powers
While Slovak presidents do not have many executive powers, they can veto laws or challenge them in the constitutional court. They also nominate constitutional court judges, who may become important in the political strife over the fate of Fico’s reforms, which would dramatically ease punishments for corruption.
Korcok has focused on making clear he does not want Fico and his coalition to have executive positions in the government, and also on speaking out against an anti-Western policy shift by Fico.
“I want to be at the beginning of a process which would mean improvement in the life of our people, and definitely make clear where Slovakia belongs,” Korcok said after voting in Senec, 35km (20 miles) northeast of Bratislava.
Pellegrini has tried to portray Korcok as a warmonger for his support for arming Ukraine and suggested he may take Slovak troops into the war – which Korcok has denied.
But Pellegrini has been seen as more moderate than Fico. “This is not about the future direction of foreign policy, I am also a guarantee, like the other candidate, that we will continue to be a strong member of the EU and NATO,” he said after voting in Rovinka on the outskirts of the capital.
Meanwhile, outgoing President Zuzana Caputova, a human rights lawyer who is not seeking a second term, criticised the war rhetoric in a television address on Wednesday.
“I am sorry that playing with fear was part of this campaign,” she said.
“I have had the opportunity to get to know both presidential candidates during my five years in office and I can say with clear conscience that neither Peter Pellegrini nor Ivan Korcok will drag us into any war and will not send any of our soldiers to Ukraine.”