A German far-right party has beaten the centre-right party of Chancellor Angela Merkel into third place in the eastern German state of Thuringia.
Alternative for Germany (AfD) got 23.4% against 22% for the Christian Democrats (CDU). The AfD more than doubled its vote, from 10.6% five years ago.
The AfD is stronger in ex-communist eastern Germany than in western states.
The far-left Die Linke party, part of Thuringia's ruling coalition, won the state election with just over 30%.
It plans to lead a new coalition, but that may prove difficult, as the CDU has refused to work with Die Linke.
No mainstream party is willing to do a coalition deal with the AfD, which is anti-immigration and anti-establishment.
The Thuringia AfD is led by Björn Höcke, 47, who heads a stridently nationalist group called Flügel and has been accused of inflammatory rhetoric. During the campaign, his CDU rival in Thuringia, Mike Mohring, called him a "Nazi".
Mr Höcke has expressed controversial views about the Nazi period: he once deplored Berlin's Holocaust memorial as a "monument of shame".
The CDU's junior partner in the national ruling coalition, the centre-left Social Democrats (SPD), saw its support crumble from 12.4% to 8% in Thuringia.
So the result is seen as a significant setback for the central government. It is expected to intensify leadership battles in both ruling parties.
Merkel's CDU under pressure
Analysis by the BBC's Damien McGuinness in Berlin
The election results have thrown Angela Merkel's CDU into turmoil. Until 2014, Thuringia was a CDU stronghold. But on Sunday the party came third, beaten by the far-left and the far-right.
The region's CDU leaders have been unusually blunt about who they blame: the national party in Berlin, which is accused of drift as it prepares for the post-Merkel era.
Chancellor Merkel herself remains untainted - she stepped down as party leader earlier this year, precisely to avoid a defeat in eastern Germany, where she is a hate figure for the AfD.
But it is a blow for the CDU's new leader Annegret Kramp-Karrenbauer, whose chances of being the next chancellor have been fading after a series of recent missteps.
More conservative rivals, who feel they have a better chance of beating the AfD, are already circling.
The CDU is split over whether to work with Die Linke in Thuringia. The CDU's policy rules it out. But CDU leaders in Thuringia disagree, and say they are open to talks. For the conservatives, even talking to a party with roots in East German communism would be a political earthquake.
Why does the AfD alarm mainstream Germany so much?
"For Thuringia and the democratic centre this is a bitter result," said the CDU's Mike Mohring.
"We fought for this democratic centre and this democratic centre did not get a majority."
The AfD was founded in 2013 as an anti-euro party but dramatically shifted its focus to immigration and Islam, building support during the migrant crisis of 2015.
"The sun is rising above the east and soon we will let the sun shine above all of Germany," Mr Höcke told chanting supporters on Sunday.
"We have made the east blue [the AfD colour] and in just a few years, we will be a people's party for all of Germany."
Two years ago, the AfD shocked Germany's political establishment, acutely sensitive to the country's Nazi past, when it won 12.6% of the vote in a general election and entered parliament for the first time.
The government warned this month of a high threat posed by right-wing extremism, anti-Semitism and right-wing terrorism.
Bodo Ramelow, who became Die Linke's first state premier in 2014 in Thuringia, told Germanys ARD channel he saw himself "clearly strengthened".
"My party clearly has the mandate to govern and I will take it up," he was quoted as saying by Reuters news agency.