Defence Minister Erjavec resigns after losing party presidency
Pivec, 47, won 143 votes at Saturday's congress to Erjavec's 80 to end his 15-year tenure at the helm of the party, having ran an insurgency campaign that offered an alternative vision of the party's future in a desire to make it more inclusive and collaborative.
Erjavec, one of the most seasoned politicians in Slovenia, had meanwhile pledged to stay the current course of focusing on pensions, brushing off allegations that his leadership style and substance were eroding the party's approval rating.
After the results were revealed, Erjavec immediately announced he would resign from government. "I expected confidence but did not get it ... I followed my conscience and worked to the best of my abilities. The time has come for a new generation and I wish it all the best," he said.
Erjavec, 59, led the party for 15 years, the second longest tenure of any current party president in Slovenia, and has been a minister in successive left and right governments, holding the environment, foreign affairs and defence portfolios.
Pivec said she had expected to win but by a narrower margin and was "humbled" to take over the leadership of DeSUS.
She urged the party to close ranks after the bitter contest, even going as far as implying that Erjavec may have announced his resignation prematurely since she saw no problem in continuing to work with him in government.
"Let's forget bad feelings and some overly emotional statements," she said, as the party has a lot of work ahead and would need the experiences of its senior members.
Addressing the party's core constituency, Pivec said that demographic change required Slovenia to take measures to prevent the older population from falling into poverty and social exclusion.
But she said it was also necessary "to remember the younger generation".
Outlining her leadership plans, Pivec said DeSUS would no longer be so willing to compromise. "We will not accept alliances without assurances of clear measures," she said.
Erjavec had been criticised for a while for the party's low public approval ratings, and Pivec said she would make sure the party is not merely around the threshold to enter parliament.
Under Erjavec's leadership, DeSUS has been in successive left and right governments for two decades, a natural position for a party that had a single issue at its core - pensions. But it performed dismally in the last two national elections and its ratings have stagnated.
In the general election in 2018 it saw its share of the vote more than halved to under 5%, barely past the 4% threshold to enter parliament.
In the 2019 elections to the European Parliament, it won under 6% of the vote and no longer has an MEP.
The congress capped weeks of very public campaigning in the media focusing on Pivec's alleged misdeeds in a period shortly before she became minister, when she was making a significant amount of money consulting for a state-funded tourism project that are now the subject of a police investigation.
She also forgot to report the funds to the anti-graft commission as required by law, a transgression that raises ethical issues but is unlikely to be serious enough to warrant action by law enforcement.
Erjavec, meanwhile, has been under pressure in recent days due to his handling of the withdrawal of Slovenian troops from Iraq after Iran attacked two bases there, with media accusing him of turning a serious matter into a PR stunt to shore up support within party ranks.
The leadership race has also had reverberations in government, with Prime Minister Marjan Šarec seen as implicitly favouring Pivec over Erjavec, leading Erjavec to accuse him of trying to take control of the party by proxy.
Šarec has denied the accusation and said he was ready to work with Erjavec or Pivec as party presidents, but many pundits believed he would have had to take some kind of action against Erjavec over the troop withdrawal in any case.
The election result makes Pivec one of the fastest rising stars in Slovenian politics.
Before she was named agriculture minister in the Šarec government in 2018, she served as state secretary at the Government Office for Slovenians Abroad, a fairly low-key government position that does not provide much public exposure.
But as minister, she has proved to be media-savvy and has made it a point to appear at agricultural events large and small across the country, even as her ministry has so far not produced major new legislation.
Pivec holds a PhD in chemical engineering and had previously worked 17 years at the Scientific Research Centre Bistra in Ptuj, of which six years as director. She comes from a well-known wine making family.