In a statement by Slovenia's state elections committee, Pahor secured 52.94 percent of the votes, with 99.98 percent of the total votes counted.
Pahor won his second term, with a record low voter turnout of around 1.7 million, 37.5 percent of voters.
In his victory speech, Pahor said he will "work for all Slovenians, and will do his best to make Slovenians' voice to be heard."
Marjan Sarec, who challenged Pahor in the elections, congratulated his opponent.
Slovenia, independent since 1991, has presidential elections every five years.