HAMBURG, Germany — German Chancellor Angela Merkel’s final speech as leader of her party was met with an 11-minute standing ovation on Friday.

The address marked the beginning of her gradual exit from both German politics and the world stage. Merkel has led the conservative Christian Democratic Union (CDU) since 2000, and been the country's chancellor since 2005.

“It is now the time to open a new chapter, it was a great pleasure for me, it was an honor,” Merkel said as she concluded her speech. Delegates held up signs reading: “Thank You, Boss.”

Merkel, 64, later handed the baton to a successor at the party congress in Hamburg.

Annegret Kramp-Karrenbauer, who was widely seen as the chancellor's favorite and has been branded a "mini-Merkel" by some media outlets, was elected as her replacement on Friday.

Annegret Kramp-Karrenbauer celebrates next to German Chancellor Angela Merkel after being elected as leader of the CDU party on Friday. FABIAN BIMMER / Reuters

Kramp-Karrenbauer — who often goes by her initials AKK — got about 52 percent of the vote in in a run-off with Friedrich Merz, a former lawmaker who left politics to work as a corporate lawyer.

German party leaders, including Merkel, have traditionally been selected through backroom deals and faced no competition during confirmation votes at party conventions.

But for the first time since 1971, CDU delegates were on Friday given the opportunity to elect their new party leader from among several candidates.

Like Merkel, Kramp-Karrenbauer represents the more moderate wing of their party. The 56-year-old is a mother of three who previously served as the governor of the small German state of Saarland.

The two other candidates who hoped to replace her for the CDU post had both openly criticized some of the chancellor’s policies in the past.

Jens Spahn, Germany's 38-year-old health minister, repeatedly spoke out against Merkel's open-door migration policy which resulted in the arrival of nearly a million refugees.

Angela Merkel after being elected as CDU leader on April 4, 2000. Michael Jung / AFP - Getty Images

Merz presented himself as the candidate who could bring back voters from the far-right populist AfD.

Amid rising anti-foreigner sentiment in Germany, the anti-immigration and anti-E.U. AfD won 13 percent of the votes in the German state of Hesse in October.

“The times today are challenging for our country, for our party, with the AfD on the right and a polarization of society,” Merkel warned in her speech.

Merkel also had a message for President Donald Trump, stating that her party had to show its strengths in an age of “growing renunciation of multilateralism” and in times of “reducing international cooperation to the principles of deal-making.”

Judith Hoerning, a 23-year-old delegate, told NBC News that while Merkel had "shaped the party in a good way" she believed her decision to step down was "courageous and right because the party needs transformation now.”

Judith Hoerning. Andy Eckardt / NBC News

Jens Eckhoff, a 52-year-old delegate from Bremen, said he was happy AKK was elected because he believed she could "help gain voters in the center and can also win against the populists with good arguments."

Germany’s neighbors are already concerned that the departure of Europe’s longest serving leader could weaken the European Union.

“There is still huge respect for Merkel because she gave stability in Europe at a time when things were rocky,” said Judy Dempsey, a nonresident senior fellow at the Carnegie Europe think tank.