HAMBURG, Germany (AP) -- Chancellor Angela Merkel's party celebrated her 18 years as its leader with a lengthy standing ovation on Friday as it prepared to elect a successor who could help shape Germany's political direction for the next generation.
A close ally of Merkel's and a one-time rival were considered favorites for the leadership of the center-right Christian Democratic Union.
Merkel announced in October she would give up the reins in her party, though she plans to remain chancellor until her current term ends in 2021. However, it is possible that the next election could come earlier.
Three high-profile contenders have spent the last month touring Germany to drum up support. Major German parties have tended to determine their leaders without a contest, and this is the first open competition for the CDU leadership since 1971.
The outcome is hard to predict, and the race is expected to be close. Whoever wins will be favorite to run for chancellor in the next election, though that isn't automatic.
The favorites are CDU general secretary Annegret Kramp-Karrenbauer, a Merkel ally who is widely considered the chancellor's preferred successor and is closest to her centrist stance; and Friedrich Merz, a former leader of the party's parliamentary group who stands for a more conservative approach and is seeking a comeback after a decade away from front-line politics.
Both have prominent backers, though many CDU grandees — including the chancellor — have held off publicly endorsing a candidate.
Health Minister Jens Spahn, another Merkel critic, is considered the outsider. At 38, he would represent a generational change. Kramp-Karrenbauer is 56 and Merz 63, only a year younger than the chancellor.
The choice will be made by 1,001 delegates at a party congress in Hamburg, many of them professional or part-time politicians at federal, regional or local level.
Merkel has been CDU leader since 2000 and chancellor since 2005. She moved her party relentlessly to the center, dropping military conscription, accelerating Germany's exit from nuclear energy, introducing benefits encouraging fathers to look after their young children and allowing the introduction of gay marriage.
Most controversially, she allowed large numbers of asylum-seekers into Germany in 2015.
Merkel listed some of those moments and many more in a half-hour farewell speech as leader, telling delegates that "our CDU today is different from the year 2000, and that is a good thing." She also celebrated Germany's balancing its budget in recent years and its response to the eurozone debt crisis.
For years, Merkel's popularity lifted the CDU and its Bavaria-only sister party, the Christian Social Union. In the 2013 election, they won 41.5 percent of the vote and only just fell short of an outright parliamentary majority.
At present, the center-right bloc is polling around or below 30 percent. Merkel's fourth-term governing coalition with the center-left Social Democrats has lurched through a series of crises since taking office in March, and the CDU has lost supporters both to the liberal Greens and the far-right Alternative for Germany.
Merkel, however, recalled that the CDU was in a deep crisis when she took over in 2000, mired in a party financing scandal surrounding ex-Chancellor Helmut Kohl.
"We are in demanding times today, no doubt about that," she said. "But ... we faced an hour of destiny for the Christian Democratic Union 18 years ago."
"We kept a cool head," she said. "We showed everyone."
Merkel appealed to the party to show unity, noting that arguments in recent years over migration have showed "where endless arguments lead."
"I wasn't born as chancellor or as party leader," she said. "I have always wanted to do my government and party jobs with dignity, and one day to leave them with dignity."
"Now it is time to open a new chapter," Merkel said. She was greeted by a several-minute standing ovation, with some delegates holding up "Thank you, boss!" placards.