German politicians have voted to re-elect Angela Merkel as chancellor for a fourth, and likely final, term.
It may prove her most challenging yet as she takes charge of a fragile coalition with her personal standing diminished.
Members of the Bundestag voted by 364 to 315, with nine abstentions, in favour of re-electing Ms Merkel.
The coalition of her conservatives and the centre-left Social Democrats has 399 votes in the lower house of parliament.
"I accept the vote," said a beaming Ms Merkel.
In office since 2005, she has dominated Germany's political landscape and steered the European Union through economic crises.
But her authority was dented by her decision in 2015 to commit Germany to an open-door policy on migration, resulting in an influx of more than one million people.
She must now juggle competing domestic demands from her conservative CDU/CSU alliance and the SPD, just as Germany is locked in a trade stand-off with the United States.
Ms Merkel met President Frank-Walter Steinmeier to take the oath of office before returning to the Bundestag to be sworn in.
Her taking office comes almost six months after last September's national election in which both coalition partners lost support to the far-right Alternative for Germany (AfD).