BERLIN (AP) — A pair of upcoming German state elections could show whether the center-left Social Democrats can win back the momentum they need to deny conservative Chancellor Angela Merkel a fourth term.

Sunday’s vote in Schleswig-Holstein and the May 14 election in North Rhine-Westphalia, Germany’s most populous state, are the last tests at the ballot box before a national election in September.

The Social Democrats surged in national polls after Martin Schulz, a former European Parliament president, was nominated in January as Merkel’s challenger. However, a state election in tiny Saarland in March saw Merkel’s Christian Democrats beat the Social Democrats by an unexpectedly wide margin and their ratings have sagged.

Nationally, Schulz’s nomination had helped the Social Democrats draw roughly level with Merkel’s conservative bloc, but the latest polls show them trailing by about eight points.

The Social Democrats have run the northernmost state of Schleswig-Holstein since 2012. The region of 2.8 million people elects a new state legislature Sunday — a week before voting in North Rhine-Westphalia, which has nearly a quarter of Germany’s population.

North Rhine-Westphalia, in western Germany, is a traditional Social Democratic stronghold. It is also Schulz’s home state, though he isn’t on the ballot May 14. With 17.9 million people it has more inhabitants than the Netherlands, Belgium and many other European countries, and its elections are always a significant test for national politics.

“In both cases, it will be important for the Social Democrats to get a result that allows them to say that, despite a certain calming of the Schulz hype, this upswing still exists and there is still enough mobilization to take this effect into the national election,” said Gero Neugebauer, a political scientist at Berlin’s Free University.

“The peak is over because the appeal of the new has gone,” Neugebauer said of the “Schulz effect.” Still, even though it has slipped back behind Merkel’s conservatives, his party is polling better nationally than it was before his nomination in January.

Whether it can hold on to power in Schleswig-Holstein, something of a swing state, is another question. Social Democratic governor Torsten Albig is defending a slim majority for his governing coalition with the Greens and the left-leaning SSW party, which represents the region’s Danish minority. Polls point to a tight race with Merkel’s Christian Democrats.

The Greens, who are polling strongly in Schleswig-Holstein thanks to popular regional leadership, are weak in national polls — and also in North Rhine-Westphalia, where they are Social Democratic governor Hannelore Kraft’s junior partners. Polls have suggested that the Christian Democrats have narrowed what was a large deficit and that Kraft is likely at least to need a new partner.

The conservatives have sought to portray the state government as slack on security, pointing to incidents such as the New Year’s Eve sexual assaults in Cologne in 2015 and questions over regional officials’ handling of sometime resident Anis Amri, the rejected Tunisian asylum-seeker who drove a truck into a Christmas market in Berlin in December, killing 12 people.

Merkel has accused North Rhine-Westphalia’s top security official, Social Democrat Ralf Jaeger, of “serious shortcomings.”

The nationalist Alternative for Germany, or AfD, is banking on issues such as concerns about security and lingering anger over the migrant influx of 2015 to carry it into two more state legislatures.

However, the party has recently suffered from a new bout of infighting as it gears up to seek national parliamentary seats for the first time. Polls have shown it only just above the 5 percent support needed to get into Schleswig-Holstein’s parliament.