BERLIN — Germany’s Social Democrats voted in favor of forming another government with Chancellor Angela Merkel’s conservatives, ending nearly six months of political limbo and setting Europe’s economic powerhouse on a path to the political stability it craves — at least for now.
The Social Democrats overwhelmingly supported another coalition with the Christian Democrats in a move that would keep Ms. Merkel, long considered a de facto leader of Europe, in the chancellery in Berlin for another four years, the party announced Sunday.
But many predicted that the country, shaken by the prolonged uncertainty that followed inconclusive elections in September, would not be the same again. Both main parties received their worst postwar results in those elections. By now, the “grand coalition,” as the tie-up is known, looks anything but grand: In polls, it no longer commands a majority. And the far-right Alternative for Germany party, now the official main opposition in Parliament, has been gaining momentum.
“This episode will mark German politics for a long time,” said Henrik Enderlein, a professor of political economy at the Hertie School of Governance in Berlin. “The two large parties will have to fight hard to win back control.”
So unpopular was the prospect of another stint in government with Ms. Merkel that the Social Democrats had promised their 463,000 members a vote on the coalition treaty, effectively making them the arbiters of whether their nation of 82 million would finally have a government. Some 78 percent of party members voted, of which more than 66 percent supported the new government.
“The members of the Social Democrats did not take this vote lightly,” said Olaf Scholz, the party’s acting leader, after Dietmar Nietan, treasurer of the Social Democrats, also known by the party’s German initials, S.P.D., announced the decision on Sunday.
The vote came four months after Ms. Merkel failed in her first attempt to build a coalition. It also came after Martin Schulz was forced to hand over the reins as leader of the Social Democratic Party.
The result means a new German government could be sworn in as early as March 14. The new administration, however, will lack the strength of its predecessor, formed after a similar nail-biting vote by the Social Democrats in 2013.
Ms. Merkel has noted that she needs to focus more on domestic issues as the country grapples with the challenges of integrating the roughly one million migrants who arrived in Germany recent years.
In the prelude to the vote, Social Democratic leaders crisscrossed the country, holding a series of town-hall-style meetings in a bid to persuade members to either support or reject a new coalition government with the Christian Democrats.
Governing with their traditional rivals has blurred the lines between the two camps. When the Social Democrats first joined Ms. Merkel’s conservatives in government, in 2005, they received 34 percent of the vote. After the S.P.D.’s second stint as a junior coalition partner, over the past four years, that share fell to 20 percent.
The past weeks have seen the party’s popularity plunge even further, losing as much as another five percentage points in some surveys. In addition, infighting over leadership and ministerial posts further frustrated supporters.
The center-left Social Democrats and Ms. Merkel’s center-right Christian Democratic Union have each lost ground to the political extremes in recent years. The arrival of the anti-immigration party Alternative for Germany, or AfD, in the national Parliament after the September vote has made forming a government much harder.
Parliament now includes lawmakers from seven political parties, spanning the full political spectrum, and traditional postwar coalitions on the left or right no longer have a majority.
In the September election, Ms. Merkel’s party had its worst showing since the Federal Republic of Germany was founded, in 1949. An attempt late last year to form a coalition government, with the free-market Free Democrats and the Greens, failed after four weeks of discussions.
The Christian Democrats took up new negotiations with the Social Democrats, and a coalition agreement emerged in early February. The 179-page document details the main issues to be addressed, such as spending and which party will name ministers to take cabinet posts in the government.
The Social Democrats walked away with three key portfolios — the foreign, labor and finance ministries — which will play a crucial role in coming negotiations over the issue of overhauling the euro currency union.
Those ministries could also offer the Social Democrats a chance to regroup and define their positions in the coming years, after which they would face an election without Ms. Merkel, who has said this term in office will be her last.
In the meantime, Berlin’s neighbors have been waiting for it to return its focus to the world. President Emmanuel Macron of France needs Ms. Merkel’s support if he is to help push through ambitious overhauls to protect the euro area against another financial crisis.
Britain wants the chancellor’s attention on talks about the country’s negotiations to leave the European Union, a process known as Brexit. And across Europe, countries rely on German leadership on issues as far-ranging as migration and defense.