Croatia’s newly elected centre-left president has pledged to make the country a more tolerant place after denying a second term to the rightwing incumbent, Kolinda Grabar-Kitarović.

Zoran Milanović won 52.7% of the vote in a second-round runoff against Grabar-Kitarović on Sunday, a few days after the country assumed the rotating presidency of the EU.

“If this narrow but fair and clear victory brought a little faith and a little spirit into this society of ours and among these people, I am a happy man, and let us rejoice together!” Milanović told a crowd at his campaign headquarters in Zagreb on Sunday evening.

A former prime minister from the Social Democrat party, Milanović has promised to turn the page on the country’s wartime past, and advocated for Croatia becoming a “normal country” during his campaign.

“Let’s be united in (our) differences,” the 53-year-old told his supporters. “Four million of us … are looking for our place in Europe, which is, despite all the problems, the nicest place to live, the most peaceful project in which Croatia must find its place and interest,” he said.

On Sunday evening, Grabar-Kitarović conceded defeat and promised a “civilised transfer” of power to Milanović. The Croatian presidency is a largely symbolic role, but analysts said the shift to the right during the campaign had threatened to poison public debate.

Grabar-Kitarović, who rose to international prominence during Croatia’s run to the World Cup final in Russia in 2018, had initially been favourite to win the race, but ran an uncertain campaign marred by gaffes. Her campaign veered into hard-right territory in order to see off the first-round challenge of a nationalist singer, Miroslav Škoro, but in the end failed to unite the country’s right wing.

She had based her campaign around patriotism and pride in Croatian history, and made references to the 1990s wars during her campaign. She also received a controversial endorsement from Julienne Busić, who was jailed together with her husband after hijacking a passenger flight from New York to Chicago in 1976 to draw attention to Croatian demands for independence from Yugoslavia. Grabar-Kitarović’s HDZ party ran videos of the endorsement, drawing criticism.

The HDZ is split between centre-right and hard-right elements, and analysts said it was possible that Grabar-Kitarović’s defeat could lead the party to move back towards the centre before parliamentary elections later this year. Such a move is favoured by Andrej Plenković, the HDZ prime minister. Speaking on Monday, Plenković said his party would analyse the result to understand why it lost.

Milanović was prime minister from 2011 to 2016, and overcame a reputation as an out-of-touch elitist to win the presidential vote. Analysts attributed his victory as much to a protest vote against Grabar-Kitarović as an endorsement of his candidacy.

He will take charge of the country during Croatia’s EU presidency, a period in which the bloc’s agenda is likely to be dominated by the post-Brexit fallout and debate over whether the EU should press ahead with enlargement plans and take in Croatia’s fellow western Balkan states.

Croatia was the last country to join the EU, in 2013, and this is the first time it has held the presidency.