Borut Pahor, former Slovenian prime minister, has won an emphatic victory in the country’s presidential run-off election.
With almost all votes counted, Borut Pahor polled 67% to incumbent President Danilo Turk’s 33% in a poll following days of protests over the economy and alleged government corruption.
On Friday a number of people were injured as protesters clashed with police in the capital Ljubljana.
Slovenia is facing one of the eurozone’s deepest recessions.
The country’s economy has shrunk more than 8% since 2009.
Thirty-three people were charged with public order offences after the trouble in Ljubljana, police said.
A protest that attracted thousands of people earlier in the week in the second city, Maribor, also turned violent.
Polls across Slovenia opened at 07:00 local time and closed at 19:00.
Commenting on the recent protests in the country, Borut Pahor told the Associated Press that the demonstrations “signal a lack of confidence” in government institutions.
Many protesters are angry at what they describe as harsh austerity measures being implemented by the current centre-right government.
They also accuse the government of corruption – a claim denied by the authorities.