Germany's Social Democrats (SPD) voted decisively for another coalition with Chancellor Angela Merkel's conservatives on Sunday, clearing the way for a new government in Europe's largest economy and ending months of political uncertainty.
Two thirds of the membership voted "yes" to the deal, a party official said -- a wider margin than many had expected -- meaning Merkel could be sworn in for a fourth term by mid-March, in a repeat of the grand coalition that has governed since 2013.
The challenges are piling up for Merkel, who has been acting chancellor for more than five months since an inconclusive election, with Europe looking to its largest country for leadership on a host of economic and security issues.
Addressing party activists lining the balconies around the atrium of the party's Berlin headquarters early on Sunday, acting SPD leader Olaf Scholz said: "We now have clarity: the SPD will join the next German government."
Merkel took to her party's Twitter feed to congratulate the SPD. "I look forward to working with the SPD again for the good of our country," she said.
European Commissioner for Economic and Financial Affairs Pierre Moscovici congratulated the SPD for "their responsible and decisive vote" on Twitter and said Germany was now "ready to engage for a stronger Europe".
French Finance Minister Bruno Le Maire wrote on Twitter that he had spoken to Scholz and acting finance minister Peter Altmaier, a Merkel ally, by telephone on Sunday morning to discuss giving the euro zone new impetus after the SPD's vote, adding: "Resolved to work closely together!"
The SPD ballot pitted the leadership of the centre-left party against the radical youth wing, which wanted the SPD to rebuild in opposition after a disastrous election showing.
"I'm happy it worked out this way," Andrea Nahles, the SPD's likely next leader, told Reuters.
Scholz declined to comment on reports that he would be finance minister, saying only that the SPD would appoint three men and three women to the federal cabinet. As part of the price for its support, the SPD will take the helm at key ministries, including the finance ministry.
The outcome means the far-right Alternative for Germany (AfD) will be the largest parliamentary opposition party. In a tweet, they labelled the SPD's decision a "catastrophe" for Germany, promising fierce opposition over the coming four years.
Kevin Kuehnert, head of the SPD's youth wing, said he was disappointed but that the "Jusos" (youth wing) would keep up their criticism, signalling that, after bringing in a flood of new members, they would be a thorn in the leadership's side.
"Criticism of the grand coalition remains. The SPD needs to be more like it has been in recent weeks and less like it has been in recent years - the Jusos will ensure this," he tweeted.
The party, already one of Europe's largest, has seen tens of thousands of new members join this year. Turn-out in the poll was over 78 percent.
German business greeted with relief the news that Germany would get a government after its longest-ever post-election interregnum.
"While the United States are starting a trade war and China is challenge our industrial leadership, we have been unnecessarily self-absorbed," engineering trade union VDMA's managing director Thilo Brodtmann said.
The SPD was forced to revisit its original plan to go into opposition after the failure of Merkel's initial attempt to form a coalition with two smaller parties.
With her conservatives, they thrashed out a coalition agreement which SPD leaders hailed for its commitments to strengthening the EU and giving them key government roles.