BERLIN (AP) — Chancellor Angela Merkel’s coalition suffered a new setback, and Germany’s main opposition parties celebrated gains in a state election Sunday that came as Mrs. Merkel’s unpopular government grapples with the eurozone debt crisis and other challenges.

The vote in Mecklenburg-Western Pomerania, a northeastern region where Mrs. Merkel’s parliamentary constituency is located, was the sixth of seven German state elections this year — most of which have gone poorly for the chancellor’s center-right coalition.

The center-left Social Democrats, who lead the state government but are in opposition nationally, won nearly 37 percent of Sunday’s vote — a gain of more than 5 points compared with five years ago, according to ARD and ZDF television projections based on exit polls and a partial count.

The other winners were the opposition Greens, who have been riding high in national polls. They were projected to win more than 8 percent and enter the state legislature for the first time, which national leader Cem Ozdemir called “a true sensation.”

Mrs. Merkel’s conservative Christian Democratic Union, however, was seen sliding to below 24 percent from nearly 29 percent in 2006. And its partner in the national government, the Free Democratic Party, was set to score just 3 percent — losing two-thirds of its support and its seats in the state legislature.

“The CDU is, of course, disappointed by this election result,” senior federal lawmaker Peter Altmaier told ARD. He added that it pointed to the need “to stand together. … This is the precondition for people to have confidence in our policies.”

That adds to issues such as this year’s abrupt decision to speed up Germany’s exit from nuclear power, its abstention in a U.N. vote on the no-fly zone over Libya, and constant internal squabbling over plans for tax cuts — all blamed for undermining center-right support.

The pro-business FDP has taken much of the blame for the squabbling and has struggled to reverse a slump in polls since Philipp Roesler, the new vice chancellor, took over as leader in May.

“This is a defeat that tastes bitter,” said the FDP’s general secretary, Christian Lindner. “For us in Berlin, this means (we need) to work with discipline on the bread-and-butter issues — the euro, the economic situation, jobs.”

The projections suggested that the far-right National Democratic Party would get the 5 percent backing needed to retain seats it won five years ago in Mecklenburg-Western Pomerania’s state legislature, despite losing some support.

It is one of only two regions where the party, which has no seats in the federal parliament, has local lawmakers.

About 1.4 million people were eligible to vote in the sparsely populated state on the Baltic coast — an economically struggling region once part of communist East Germany.

It is currently run by a left-right “grand coalition” of the Social Democrats, which provides popular Gov. Erwin Sellering, and Mrs. Merkel’sCDU.

Mr. Sellering could continue that alliance or form a coalition with the ex-communist Left Party, which scored some 17 percent, though that appears less likely. That combination ran Mecklenburg-Western Pomerania until 2006.

This year’s last scheduled state election comes on Sept. 18, when opposition-run Berlin votes.