A German state premier elected with help from the far-right Alternative für Deutschland has announced he will step down, succumbing to widespread outrage across the country and condemnation from Angela Merkel.

A postwar consensus among established parties of shunning the far right was broken on Wednesday when Thomas Kemmerich won the election in the eastern state of Thuringia on the back of votes from the chancellor’s Christian Democratic Union and the aggressively nationalistic AfD.

The little-known Free Democrat (FDP) politician told German media on Thursday morning that he was right to have accepted the mandate, arguing that fresh elections would merely play into the hands of the far right and the far left.

By lunchtime, however, after a meeting with his party leader, Christian Lindner, Kemmerich had changed his mind. “Resignation is unavoidable,” he said. “Democrats need democratic majorities.”

Merkel had waded into the affair earlier in the day, saying it was “unforgivable” that politicians from her centre-right party voted with the AfD to remove Thuringia’s leftwing premier, and that the outcome “has to be reverted”.

The outgoing state premier, Bodo Ramelow, from the leftwing Die Linke party, had emerged as the candidate with the strongest support in last October’s elections and had been widely expected to be sworn in to form a minority government in the third round of voting.

Instead it was Kemmerich, whose party had barely sneaked into parliament on 5% of the vote, who won the secret ballot by a single vote.

In a tweet sent on Wednesday afternoon, Ramelow drew attention to the fact that it was in Thuringia that Adolf Hitler’s Nazi party had first entered the German parliament and thus paved its path to power, 90 years ago almost to the week.

Bodo Ramelow (@bodoramelow) "Den größten Erfolg erzielten wir in Thüringen. Dort sind wir heute wirklich die ausschlaggebende Partei.[...] Die Parteien in Thüringen, die bisher die Regierung bildeten, vermögen ohne unsere Mitwirkung keine Majorität aufzubringen."



A. HitIer, 02.02.1930 pic.twitter.com/icDXFSKzC7

The AfD’s branch in Thuringia is dominated by the party’s aggressively nationalist wing. Last September a court ruled that the AfD’s state leader, Björn Höcke, could legally be termed a fascist, saying such a designation “rests on verifiable fact”.

Speaking during a state visit to South Africa, Merkel described the circumstances of Kemmerich’s election as “a singular process that broke with a fundamental conviction of mine and my party’s, namely that you don’t win majorities with the help of Alternative für Deutschland.”

What will happen next in Thuringia, a relatively small state with a population of 2.1 million, remains far from clear, however.

In a move that raises questions over CDU leader Annegret Kramp-Karrenbauer’s control over the party’s regional groups, its Thuringia branch on Thursday appeared to reject the possibility of fresh elections, saying it wanted to continue to work with Kemmerich.

Dissolving the state parliament will need a two-thirds majority – which would require votes from the CDU or the AfD. Kemmerich could call a vote of no-confidence instead, which would open the door to leftwing ex-premier Ramelow to be voted in after all. The Die Linke politician, who is seen as a moderate within the successor party of the East German Socialist Unity party, has made clear he remains available for the post.

Either way the political earthquake in Germany’s east has already done damage to the reputation of the two centre-right parties, Merkel’s CDU and the FDP, a pro-business party with liberal roots that used to be a natural junior coalition partner for the Christian Democrats.

Free Democrat leader Lindner, who walked out of coalition talks with the CDU and the Greens in 2017 saying it was “better not to govern than govern badly”, faces criticism from his members, several of whom have announced plans to cancel their membership on social media.

Having initially voiced his surprise at the outcome of the vote, some reports have since suggested that Lindner was explicitly warned that the AfD could use his candidate as a vehicle to gain political influence.

The AfD had fielded its own straw-man candidate in the anonymous third round of voting, without lending him any of its votes.

Lindner has announced an internal confidence vote over his leadership for Friday.

Merkel too appeared to criticise the FDP. She said Kemmerich gaining a majority only with the help of the far right had been predictable. “Therefore it has to be said that this process is unforgivable and the result has to be reverted,” she said.

The events in Thuringia were met with protests in several cities around the country, including Berlin, where about 1,000 people gathered outside the FDP headquarters. In Erfurt, protesters formed a human chain outside the parliament, chanting: “Who betrayed us? Free Democrats!”

Leading members of Germany’s “grand coalition” – forged between Merkel’s conservatives and the SPD in 2018 – are due to meet at the weekend to discuss the situation.