Members of Germany's Social Democrat Party (SPD) have voted in favour of entering a coalition with Chancellor Angela Merkel's conservatives in a postal ballot, according to a statement by the party.

The vote clears the way for a rerun of the "grand coalition" that has governed Germany since 2013. It also puts an end to more than four months of political uncertainty in Europe's largest economy by making Merkel the country's chancellor for the fourth term.

SPD acting leader Olaf Scholz said on Saturday turnout in the poll had been "very, very high" after an intense internal campaign that pitted the party's pro-coalition leadership against its more left-wing youth wing, which campaigned for "no".

Representatives from Merkel's Christian Democratic Union (CDU) party, alongside partners from the Bavarian Christian Social Union (CSU) party, agreed on terms with SPD negotiators for a new partnership last month.

Al Jazeera's Dominic Kane, reporting from the capital Berlin, said that two-thirds of the party members voted to form another grand coalition with Merkel's bloc.

"It is a decisive majority, but there is no sense of jubilation among the SDP leadership," he said.

"The heads, rather than the hearts of the party members, made this decision. They believe being in coalition with Merkel costs this party votes."

Opposition to coalition

Many in the party, including former leader Martin Schulz, had ruled out forming a coalition with Merkel's conservatives, saying that September's poll results - which saw the SPD recording its worst post-war election performance, at 20.5 percent - had directed the party to go into opposition.

However, the SPD agreed to negotiate with Merkel's conservatives after talks with the pro-business Free Democrats (FDP) and the environmentalist Greens on a three-way tie-up collapsed in November.

Schulz, the who led the party during the elections, quit in the process of the coalition talks.

The SPD has already been the junior partner in two Merkel-led "grand coalitions", from 2005 to 2009 and from 2013 to 2017.

Merkel's CDU/CSU alliance had finished first, securing 33 percent of the vote, down nine percentage points from 2013.

The biggest shock, however, was the emergence of the far-right Alternative for Germany (AfD) party as the country's third-biggest political force, winning a 12.6 percent share of the vote.