German Chancellor Angela Merkel is set to form her fourth government after the opposition Social Democrats voted in favour of another grand coalition.
The vote by 464,000 rank-and-file members ends five months of political deadlock since September's election.
A BBC report says the Social Democrats had been split between the party's leadership, which backed joining the coalition, and its radical youth wing, which did not.
Merkel has been in power for 12 years.
SPD voters approved continuing the coalition with 66% in favour and 33% against. Vote counting went on through the night at the SPD headquarters in Berlin.
The German Chancellor faces a range of challenges, including strong opposition from the nationalist Alternative for Germany (AfD).
The anti-immigrant party entered the federal parliament for the first time in September and now makes up the largest opposition group.
The Social Democrats (SPD) suffered their worst ever election result and many blamed their coalition with Merkel's Christian Democrats (CDU/CSU) for the poor performance.