Germany’s Social Democratic party has agreed to form another “grand coalition” government with the conservative CDU, seeing Angela Merkel stay in office for a fourth term and putting an end to five months of political uncertainty in the country.
Two thirds of the membership backed the deal — a wider margin than expected, according to a party official.
After an inconclusive election, Germany and Europe saw months of political uncertainty and the European Union now looks to its largest country for leadership.
Acting SPD leader Olaf Scholz said at the party's Berlin headquarters: "The vast majority of SPD members followed the party leadership's suggestion."
"We now have clarity: the SPD will join the next German government," he added.
Using high-speed letter opening machines, SPD leaders worked through the night alongside volunteers counting ballots at party headquarters in Berlin.
Almost half a million party members were eligible to vote.
A rejection of the coalition could have meant another election or a minority government - something unprecedented in post-war Germany.
German Chancellor Angela Merkel congratulated the Social Democrats (SPD) on a "clear result" after a majority of SPD members voted in favour of joining another coalition with her.
"I congratulate the SPD on this clear result and look forward to continuing to work together for the good of our country," Merkel said on her Christian Democrats' (CDU) Twitter feed.