German Chancellor Olaf Scholz on Monday urged mainstream parties to avoid working with the far-right, after record gains by the AfD in two regional polls sent alarm bells ringing a year before a general election.In the former East German state of Thuringia, the anti-immigrant, anti-Islam AfD became the first far-right party to win a regional election since World War II, taking around 33% of the vote on Sunday.The AfD was also headed for a close second place in neighbouring Saxony, just behind the conservative CDU.Scholz, whose deeply unpopular three-party coalition received a slapdown in both states, called the results “bitter”.“All democratic parties are now called upon to form stable governments without right-wing extremists,” he said in a message on Facebook.“Our country cannot and must not get used to this. The AfD is damaging Germany. It is weakening the economy, dividing society and ruining our country’s reputation,” he said.Coalition governments are the norm in Germany at federal and state levels, and mainstream parties have consistently ruled out collaboration with the far right.But AfD co-leader Alice Weidel said she believed the “undemocratic firewall” was untenable given the party’s electoral success in both states, while fellow leader Tino Chrupalla said there would be “no politics without the AfD”.In Thuringia, where the Nazi party first came to power in 1930, the AfD’s large share of the vote means it will have a “blocking minority” in the regional parliament, giving it special powers including the right to block judicial appointments.In the city of Erfurt in Thuringia, 22-year-old pharmacy student Marius Guender said he felt “really depressed” at the outcome, adding that he wanted “a Germany that is there for everyone”.But Siegfried Koehler, 67, complained of “too many migrants”.“They easily get money (from the state), and us pensioners need pensions to go up,” he told AFP.The conservative CDU, the only centrist party to perform strongly on Sunday, reiterated that it would not open coalition talks with the AfD despite the complicated electoral maths now looming.The CDU only narrowly edged out the AfD with 32% of the vote in Saxony, and came second in Thuringia.The conservatives hold hopes of leading the next government in Thuringia, with their lead candidate Mario Voigt appealing for a “reasonable government “ in a coalition led by the CDU.The AfD’s controversial local leader, Bjoern Hoecke, meanwhile declared that his party was the “people’s party in Thuringia” and that “change will only come with the AfD”.Hoecke has often caused outrage with his outspoken statements and was fined twice this year for deliberately using a banned Nazi slogan.Sahra Wagenknecht, who heads the far-left BSW, said her party “cannot work together” with Hoecke and has long ruled out a coalition with the AfD.The BSW, formed earlier this year as a breakaway from the ex-communist Linke party, was the other big winner on Sunday.The tough-on-migration upstart secured vote shares in the teens in both regional polls and is seen as a key building block in any coalition. The BSW however has serious differences with the more established parties that will likely complicate negotiations, including a dovish stance towards Russia and opposition to the planned stationing of US missiles in Germany.Wagenknecht said on Monday voters in Thuringia and Saxony had sent a signal to Berlin that showed the “unhappiness with the federal government” ahead of the September 2025 national election.Scholz’s Social Democrats (SPD) suffered their worst-ever regional result in Thuringia, falling to just 6.1%. The SPD scored just over 7% in Saxony.The chancellor’s partners in a fractious coalition - the liberal FDP and the Greens - struggled even more.The FDP fell below the 5% threshold for seats in both elections, while in Saxony the Greens only scraped in.The results were “nothing to celebrate”, Social Democrats party chair Lars Klingbeil said, adding that the party had to be “better”.The run-up to Sunday’s elections was dominated by a bitter debate over immigration stirred up by a suspected Islamist knife attack a few days before the vote that left three people dead.The AfD, which seized on the stabbing to criticise the government’s asylum policies, is also expected to perform strongly in a regional election in the eastern state of Brandenburg on September 22.