Germany’s ruling Christian Democrats and Armin Laschet, their leader, were in sore need of a convincing success in Sunday’s regional election in the eastern state of Saxony-Anhalt. Anything less might have intensified doubts over the party’s political direction and electoral strength as Chancellor Angela Merkel, the CDU’s dominant figure for two decades, prepares to bow out of national politics after September’s Bundestag elections.

According to exit polls, the CDU not only scored an emphatic victory in Saxony-Anhalt but put in a better performance than most opinion surveys had predicted before the vote. In particular, the CDU comprehensively saw off the challenge of the rightwing populist Alternative for Germany, taking an estimated 36 per cent of the vote against 22.7 per cent for AfD.

Saxony-Anhalt, accounting for only 2.2m of Germany’s more than 80m people, is not an accurate guide to national voting patterns. But the victory was a shot in the arm for Laschet, who has struggled to assert his authority over the CDU since being chosen as party leader in January and as its candidate for chancellor in April.

In two regional elections in March, the CDU achieved its worst results in the western states of Baden-Württemberg and Rhineland-Palatinate since the Federal Republic’s creation in 1949. The CDU appeared to be caught in a pincer, losing support to the Greens and other mainstream parties in western Germany and to the AfD in the east.

Now Laschet can take heart not only from the Saxony-Anhalt result but from opinion polls over recent weeks that have seen the CDU open a lead over the Greens at national level of between one and five percentage points. If sustained, this lead will increase the likelihood that the CDU will retain control of the chancellorship and government after September, extending its 16-year run in power under Merkel.

By contrast, the Greens — with an estimated 6.5 per cent of the vote — performed poorly in Saxony-Anhalt. This outcome underlined the unpopularity of the Greens in eastern Germany, where the party is perceived as cosmopolitan and urbanite, and is identified with unpopular causes such as liberal migration policies and globalisation.

Although the Greens are stronger in western Germany, Annalena Baerbock, their co-leader and candidate for chancellor, has made an erratic start to the party’s Bundestag campaign. The discovery that she had failed to report a small income from her party cast a cloud over the Greens’ efforts to portray themselves as fresh and different from other mainstream parties.

The AfD’s defeat in Saxony-Anhalt does not alter the fact that the party remains strong in eastern Germany. However, the election result was more favourable to Laschet, a Merkel-style centrist who explicitly rules out any co-operation with the AfD, than to more conservative CDU politicians in the east who support reaching out to the rightwing populists.

The Bundestag campaign is in its early stages and remains too tight to call. Several different combinations of coalition government are possible after September. Among them is a CDU-Green coalition, something never tried at national level. The election contest promises to be exciting and unpredictable, setting the stage for the post-Merkel era in Germany and Europe.