Angela Merkel has been elected to her fourth term as German chancellor by the Bundestag, the lower house of parliament.
Merkel garnered 364 of the 688 votes delivered in the secret ballot on Thursday and was therefore elected as expected in the first round of voting. At least 355 votes were required in the 709-seat chamber.
There were 315 votes against her re-election and nine abstentions.
For the first time, Merkel's husband Joachim Sauer was present for the vote, as was her mother, Herlind Kasner.
German President, Frank-Walter Steinmeier, had earlier proposed Merkel - who heads the largest party in the chamber, the Christian Democratic Union (CDU) - as chancellor to the lawmakers in accordance with the constitution.
Merkel was sworn in formally in Steinmeier's official residence, Bellevue Palace, on the other side of Tiergarten park from the Bundestag in central Berlin.
A volte-face by former SPD leader Martin Schulz led to a hard-fought 177-page coalition agreement in February. Two-thirds of SPD members finally approved the agreement just under two weeks ago, paving the way for a new grand coalition government under Merkel's leadership.
The three parties in the grand coalition - the SPD, the CDU and its allied Christian Social Union (CSU) - have governed Germany since 2013.
"A great amount of work lies before us," Merkel said at a press conference on Monday in Berlin ahead of the formal signing ceremony for the new deal. "I am optimistic that it will be a success."
It is expected that this will be Merkel's last term in office.