A close ally of populist Prime Minister Robert Fico beat a pro-Western career diplomat to become Slovakia's new president, and succeed Zuzana Čaputová, the country's first female head of state.

Parliamentary speaker Peter Pellegrini received 53.26% of the vote with the ballots from almost all polling stations counted by the Statistics Office in Saturday's runoff election, topping former Foreign Minister Ivan Korčok who had 46.73%.

"I can promise I will be a president of all Slovak citizens," Pellegrini said. "I can promise I'll be always by the side of Slovakia."

Pellegrini becomes Slovakia's sixth president since the country gained independence after the split of Czechoslovakia in 1993.