Image copyright Reuters Image caption Manuel Valls (L) and Martin Schulz will now share leadership duties
The Social Democrats, a junior partner in the German coalition government, have chosen health minister Jens Spahn as the new leader.
It is the first time a woman has succeeded Angela Merkel as chancellor.
The nomination of 46-year-old Mr Spahn is a sign of the party’s willingness to move left.
Mr Spahn said the party would pursue “a new level of honesty” with voters and take on “those who think only of themselves”.
It is likely that Ms Merkel will step down as chancellor in 2020. Mr Spahn said the next election, in the autumn of 2022, could be “the last that this team is in”.
Mr Spahn has written more openly about illegal immigration and tougher Germany security laws, which have won him strong support in recent opinion polls.
Ms Merkel, who was personally involved in the leadership process, decided to end her conservative Christian Democratic Union party’s reliance on the SPD as junior partner.
All decisions will now be made by Ms Merkel’s CDU and the SPD.
‘The right direction’
A key challenge facing Ms Merkel as she prepares to step down is how to adjust Germany’s future relations with the European Union.
The European Central Bank (ECB) is currently due to run out of money in summer 2019 and have only two ways of raising more capital – interest rates or bond purchases.
Related: German parties aim to halt rise of far-right party
The political compromise the chancellor is looking for in the UK is that it will leave the EU but agree a transition period as a middle path to a smooth departure.
Ms Merkel, who had close ties to US President Donald Trump, has recently adopted a more moderate tone on Brexit.
The new leader of the Social Democrats, Martin Schulz, took a different stance, saying it was time for Germany to return to a strong role within the EU.
The party’s new manifesto will be released on 28 November.
It is very likely that the manifesto will emphasise the themes of social justice and supporting workers, as demanded by the SPD’s new rank and file, and call for a new partnership with Angela Merkel’s CDU.