BERLIN — Germany’s Social Democrats voted Sunday to open talks on forming a new government with Chancellor Angela Merkel’s conservatives after party leaders urged members to overcome their apprehensions for the good of the country and stability of Europe.

Delegates of the center-left party voted 362 to 279 in favor of opening coalition negotiations with Merkel’s Union bloc after an emotional daylong debate in Bonn.

The vote was a major step toward ending the political gridlock that has prevented a new government from being formed since September’s election. Social Democratic leader Martin Schulz called it “a key moment in the history of our party.”

Merkel welcomed the decision, telling reporters she hoped to be able to soon build a “stable government that can tackle the questions of the future.”

“There’s still a lot of work before us, but it should be goal-oriented, intensive and in a sensible atmosphere despite all of the controversial issues,” she said.

Many Social Democrats expressed concerns that a 28-page agreement on the prerequisites for coalition talks hashed out between leaders of the Social Democrats, Merkel’s Christian Democratic Union and her Bavarian-only sister Christian Social Union had watered down too many of their positions.

But after the vote, Schulz pledged to negotiate hard for more concessions on labor, health and migration policies.

“We are now starting with the negotiations, and we will come back to all these points,” he said, adding that the agreed-upon prerequisites were “no coalition agreement.”

Before a new government can be established, another vote by the Social Democrats’ membership will have to be held on the final coalition agreement.

The closeness of Sunday’s vote may end up helping Schulz squeeze more concessions out of Merkel’s bloc, said Andrea Roemmele, a political science professor at the Hertie School of Governance in Berlin.

“The Union now knows very well that (after) an extremely narrow result, this still has to go through an SPD membership ballot, so the SPD signature on this coalition agreement must be very clear,” Roemmele told German public television station Phoenix.

Merkel suggested there might be some flexibility, saying the preliminary document outsides the parameters of the negotiations but “there will be a multitude of questions still to clarify in detail.”

Schulz and Merkel both said they expected the negotiations to start this week. Others have said they hope a new government might be in place before Easter.

Had the Social Democrats voted against opening negotiations, Merkel would have faced forming a minority government — which she has indicated she is not interested in doing — or a new election would have had to be called.

Ahead of Sunday’s vote, Schulz said he opposed another election and that a stable German government was needed to strengthen Europe and as a bulwark against right-wing extremism.

The Social Democrats have governed with Merkel’s Union bloc since 2013, but Schulz had vowed not to renew the so-called “grand coalition” after his party took a beating in the September election.

He told the delegates in Bonn that the initial refusal was correct, but said his position changed along with the political situation after Merkel was unable to form a coalition with two smaller parties.

“Europe is waiting for a Germany that knows its responsibility and can act decisively,” Schulz said.

He said the stakes were high, with French President Emmanuel Macron needing support in his ambitious plans to reform the European Union.

“If he fails in his policies, then it can’t be ruled out the extreme right will form the next government in Paris,” Schulz said.

Opposition to renewing the grand coalition was led by the Social Democrats’ youth wing. The youth wing’s leader, Kevin Kuehnert, told delegates that extending the alliance because it was the least-bad option would exacerbate the party’s “crisis of trust” with its supporters.

“This loop needs to be broken,” Kuehnert said.

Many Social Democrats have voiced fears that should their party become part of a new coalition, the anti-migrant nationalist Alternative for Germany party would be left as the country’s largest opposition party.

But Schulz said that holding out hope for a better outcome from another election was a risky strategy.

“Who can say that new elections won’t further strengthen the right fringe?” he asked.

He suggested his party’s best chance at regaining support from its grassroots was through vigorously pursuing its policies from within government and not behaving as a “junior partner” to Merkel.

“Any government the SPD takes part in, regardless of what coalition, must be an SPD government,” Schulz said. “That has to be our stance.”