BERLIN - A nationalist, anti-immigration party performed strongly in a German state election Sunday in the region where Chancellor Angela Merkel has her political base, overtaking her conservative party to take second place amid discontent with her migrant policies, projections indicated Sunday.

The three-year-old Alternative for Germany, or AfD, won about 21 percent of votes in the election for the state legislature in Mecklenburg-Western Pomerania, according to projections for ARD and ZDF television based on exit polls and partial counting. They put support for Merkel’s Christian Democrats at between 19 and 20 percent, which would be their worst result yet in the state.

The center-left Social Democrats, who lead the outgoing state government, were expected to be the strongest party with about 30 percent support.

Get Breaking News Delivered to Your Inbox

Mecklenburg-Western Pomerania, an economically weak region in Germany’s northeastern corner, is home to 1.6 million of the country’s 80 million people and is a relative political lightweight. It is, however, the state where Merkel has her parliamentary constituency, and Sunday’s vote was the first of five regional votes before a national election a bit more than a year away.

National AfD leader Frauke Petry celebrated “a blow to Angela Merkel.” Local AfD Leif-Erik Holm told supporters: “Perhaps this is the beginning of the end of Angela Merkel’s chancellorship today.”

Merkel’s refugee policies were a prominent issue in the campaign for Sunday’s election, which came a year to the day after she decided to let in migrants from Hungary - setting off the peak of last year’s influx. Germany registered more than 1 million people as asylum-seekers last year.

New arrivals in Germany have slowed drastically this year and Mecklenburg is home to relative few foreigners. Still, New Year’s Eve robberies and sexual assaults blamed largely on foreigners, as well as two attacks in July carried out by asylum-seekers and claimed by the Islamic State group, have fed tensions.

Merkel has stuck to her insistence that “we will manage” the refugee crisis, and has also said that “sometimes you have to endure such controversies.”

“This result, and the strong performance of AfD, is bitter for many, for everyone in our party,” Peter Tauber, the general secretary of her Christian Democrats, said in Berlin.

He said that the state government’s positive record had taken a back seat for many voters, “because among a recognizable part, there was an explicit wish to voice displeasure and protest, and we saw that particularly strongly in the discussion about refugees.”

Mecklenburg was the only one of Germany’s 16 states where the far-right National Democratic Party was represented in a state legislature, but it appeared to have lost its seats on Sunday. Projections put its support below the 5 percent needed to keep them, with many supporters apparently switching to AfD.

The state has been run for the past decade by the parties that currently run Germany. Popular Social Democratic governor Erwin Sellering has governed with Merkel’s party as his junior partner. Both parties lost support compared with the last state election five years ago, when they polled 35.6 and 23 percent, respectively.

The opposition Left Party - once popular with protest voters - also lost support, slipping about six points to 12.5 percent, and the left-leaning Greens were hovering around the 5 percent mark.

AfD is now represented in nine of Germany’s 16 state legislatures and hopes to enter the national Parliament next year. Still, it fell well short Sunday of its aim of becoming the strongest party in Mecklenburg, and also didn’t match the 24.3 percent support it won in another eastern state, Saxony-Anhalt, in March.

There’s no realistic prospect at present of AfD going into government, and other parties won’t deal with it.