Slovenia has elected a lawyer linked to former US first lady Melania Trump as its first-ever female head of state.

Natasa Pirc Musar is a journalist and lawyer

Natasa Pirc Musar is a journalist and lawyer

Natasa Pirc Musar is a journalist and lawyer who ran as an independent with the backing of Slovenia’s centre-left government.

She defeated former foreign minister Anze Logar – a veteran of conservative politics.

Ms Pirc Musar won almost 54% of the vote, ahead of Mr Logar who got just over 46%, the election commission said.

Turnout among the population of around two million was 49.9%, the commission said.

“Slovenia has elected a president who believes in the European Union, in the democratic values on which the EU was founded,” Ms Pirc Musar said after her victory.

She noted that the world is “facing tough times because of climate change”.

“Young people are now putting the responsibility on our political shoulders to take care of our planet so that our next generation, our children, will live in a healthy and clean environment,” she said.

The role of president is mostly ceremonial, but Ms Pirc Musar will be commander in chief of the armed forces and also nominates several top officials, including the central bank governor.

Ms Pirc Musar was hired as a lawyer to protect the interests of Mrs Trump, who was born in Slovenia, during her husband’s presidency.

In 2016, Ms Pirc Musar and her client filed a lawsuit against Suzy magazine in Slovenia for suggesting Mrs Trump had worked as a high-end escort while pursuing her international modelling career. An out-of-court settlement was reached.