Germany's Social Democrats (SPD) have voted decisively for another coalition with Chancellor Angela Merkel's conservatives, clearing the way for a new government 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 Mrs 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 at the party's Berlin headquarters, acting SPD leader Olaf Scholz said: "We now have clarity: the SPD will join the next German government."
Mrs 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" and said Germany was now "ready to engage for a stronger Europe".
French Finance Minister Bruno Le Maire said that he had spoken to Mr Scholz and acting finance minister Peter Altmaier, a Merkel ally, by telephone this 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 said.
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%.
German business greeted with relief the news that Germany would get a government after its longest-ever post-election interregnum.
The SPD was forced to revisit its original plan to go into opposition after the failure of Mrs 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.