Germany’s far-right Alternative für Deutschland (AfD) party has more than tripled its support in local elections in the country’s most populous state, a poll seen as Friedrich Merz’s first significant electoral test since he took office as chancellor four months ago.

According to exit poll results from North Rhine-Westphalia, Merz’s Christian Democrats won with 34% – about the equivalent of its historically worst result in the same poll in 2020 – while the AfD secured 16.5%.

North Rhine-Westphalia, home to almost a quarter of Germany’s citizens and made up of swathes of agricultural land, post-industrial towns and cities with large multi-ethnic and student populations, is viewed as something of a bellwether for the country as a whole.

Almost 14 million people were eligible to vote, equivalent to the size of some EU countries, and larger than the electorate of all east German states, where the AfD is strongest. The vote determines 20,000 seats in the councils of more than 320 towns, cities and municipalities as well as the positions of mayors and lord mayors across the state. Voter turnover was 59%, up from 2020.

Merz’s conservative CDU fulfilled predictions that it would retain its dominant position in the state. The Social Democrats, its junior coalition partner in the federal government, came in second with 22.5%, a small drop from its result in 2020 that defied pollsters’ predictions that it was facing heavy losses. The SPD has struggled to retain support in some areas, in particular former coalmining regions where it was once sure of victory.

The AfD’s strong showing lived up to pollsters’ predictions, more than tripling its standing from five years ago when it secured 5.1%, and giving its candidates who are running for mayoral positions a considerable chance of reaching second-round votes in two weeks’ time.

The AfD’s gains appear to have been made on the back of heavy losses for the Greens and the pro-business Free Democratic party. The far-left Die Linke secured 5.5%, putting it above its 2020 result of 3.8%.

The elections in Germany’s most populous state were seen as the first significant test at the ballot box for Friedrich Merz as chancellor. Photograph: Christopher Neundorf/EPA

Political observers say the vote indicates the AfD is on track to repeat the big gains it has made in the states of the former communist east, where it has been most successful at drawing on voters’ disgruntlement with the status quo. It has set as its goal to enter the federal government by 2027. Currently it is the largest opposition party in parliament.

The vote took place against the backdrop of a weakened German economy, rising unemployment and growing unease over immigration – the AfD’s key issue. Merz has pledged to get the economy back on track, reduce immigration and cut the far right down to size.

Since February’s federal election, the AfD has come top in several national opinion polls. The more success the AfD achieves in securing a foothold in local political positions, by securing mayoralties and councillor posts, the harder it will be for the mainstream parties to uphold their pledge to maintain a “firewall” preventing political collaboration with the AfD at the federal level, experts say.

skip past newsletter promotion

Sign up to Headlines Europe

A digest of the morning’s main headlines from the Europe edition emailed direct to you every week day

Privacy Notice: Newsletters may contain information about charities, online ads, and content funded by outside parties. If you do not have an account, we will create a guest account for you on theguardian.com to send you this newsletter. You can complete full registration at any time. For more information about how we use your data see our Privacy Policy. We use Google reCaptcha to protect our website and the Google Privacy Policy and Terms of Service apply.

International issues also played a role in the North Rhine-Westphalia campaign, even if they only indirectly affect local political issues, with Merz seen as a bolder figure in representing Germany’s interests abroad than his Social Democrat predecessor, Olaf Scholz.

Particular attention has been given to the role he has forged in trying to bring European allies together over the defence of Ukraine as the Trump administration vacillates over its backing. But on immigration, where he has pledged to dramatically change Germany’s policy, voters have said they are not so convinced, despite the fact that numbers have dropped in recent months.

The AfD has presented itself as a confident alternative, scoring points with voters on issues such as energy provision, education and above all immigration, even though these policy areas are not decided at the local level.