Germany's ruling Christian Democrat Union (CDU) has chosen Annegret Kramp-Karrenbauer as its new party leader, ending Angela Merkel's 18-year reign.
The CDU general secretary narrowly beat Friedrich Merz, a millionaire lawyer, in a run-off vote in Hamburg.
Ms Kramp-Karrenbauer, or AKK as she is also known, received 517 of 999 votes.
Mrs Merkel, who plans to serve out her term as chancellor until 2021, gave an emotional farewell speech at the special party conference today.
As the head of Germany's largest party, Ms Kramp-Karrenbauer could now become the next German chancellor.
The former prime minister of the state of Saarland said: "I learned what it is to lead, and above all learnt that leadership is more about being strong on the inside than being loud on the outside."
She called for party unity in her first address as leader and brought Mr Merz and her other opponent, Health Minister Jens Spahn, to the stage, saying she would be "very happy" if they joined her in this task.
The 56-year-old was the favourite for party leader and Ms Merkel's choice to succeed her.
Earlier, during her farewell speech as party leader, Ms Merkel praised AKK for her 2017 electoral success in Saarland, in a clear hint of the chancellor's personal preference.
"I would have liked to win, but it was still fun," Mr Merz told his peers, asking them to back the new party leader. The lawyer, who got 482 votes in a run-off, was a powerful player in the CDU in the early 2000s but left politics when he fell out with the chancellor.
Since then, the 63-year-old has built a career in the private sector and works for US investment firm BlackRock.
Mr Spahn, a former banker, was not seen as a likely winner and received 157 votes. The 38-year-old - a divisive figure for many having ruffled feathers in the party and cabinet - said he would "stay in the team".
Ms Kramp-Karrenbauer in many respects resembles Ms Merkel in style and politics, although she's said to be more direct, more decisive, and more approachable. She used her acceptance speech to urge the party to, in effect, continue on the centrist Merkel path.
For the wider CDU membership, she's also the popular choice. Known for her calm and analytical approach, she reassures those who feared that Mr Merz might have proven a more divisive figure.
And she raises the hopes of those who would like a smooth transition of power from Ms Merkel to a new chancellor candidate in the not too distant future.
Immigration among challenges that await new leader
But she'll have to win over those who resented Ms Merkel's centrism, her migration politics and those who fear the rise of the populist far right. But most of all, she needs to get voters back to the CDU.
Ms Kramp-Karrenbauer has sometimes been dubbed mini-Merkel or Merkel 2.0, neither nickname she particularly enjoys.
"I have read a lot about what I am and who I am," she told her party members, "Mini, a copy, simply 'more of the same'. Dear delegates, I stand before you as I am and as life made me, and I am proud of that."
Leaders of other German parties have rolled in their congratulations, such as Interior Minister Horst Seehofer, leader of CDU's sister party in Bavaria.
"You've got big shoes to fill," tweeted Andrea Nahles, leader of Mrs Merkel's coalition's junior partner, the Social Democrats.
"Good luck! Now it's time to solve problems: ensuring the future of pensions, recognising the value of work, strengthening cohesion in Europe. I offer good co-operation."
Not everyone is happy though - Sahra Wagenknecht, a left-wing leader, wrote on Twitter: "Merkel 2.0 is not a solution... Merkel's policy continues with AKK and social change is not possible."
Ms Kramp-Karrenbauer became the first woman to serve as a state minister for internal affairs in 2000 and the first woman to serve as prime minister of Saarland, a position she held from 2011 to 2018.
She is a Merkel loyalist, perceived as someone who will replicate much of the chancellor's style and policy.
However, she has differentiated herself from her mentor, voting in favour of quotas for women on corporate boards and taking a tougher line on Russia.
She is also more conservative on social issues such as gay marriage, and has vowed to review the country's position on security and migration.