“The people of Thuringia have voted for a Turnaround 2.0,” an elated Mr. Höcke said on Sunday night, using his party’s main campaign slogan. It is a play on the term Germans use to refer to the fall of Communism and German reunification, and it taps into Eastern resentments three decades later.
The AfD has been locked in a power struggle between its extremist wing, led by Mr. Höcke, and its more moderate camp, made up chiefly of disillusioned conservatives who left Ms. Merkel’s party in protest over her liberal migration policies.
Thuringia is one of the smallest states in Germany, but Mr. Höcke’s national notoriety and unapologetically provocative language, packed with echoes from the 1930s, have given the state’s election outsize importance.
The vote comes eight weeks after the AfD made gains in two other elections in the former East Germany, where support for the party’s illiberal, anti-immigrant rhetoric is significant. Further deepening that East-West split is Mr. Höcke, who leads a hard-line faction of the party known as the Flügel, or the Wing.
As elsewhere in eastern Germany, the AfD’s strength and the weakness of the traditional parties on the left and right have made forming a government more difficult in Thuringia.
Voter support on Sunday splintered among the three leading parties, preliminary returns showed. The Left Party, led by the popular incumbent governor, Bodo Ramelow, captured 31 percent of the vote, and Ms. Merkel’s conservatives drew at 22 percent. Among the smaller groups, the Social Democrats got 8 percent of the vote, and the Greens and Free Democrats each took 5 percent.
The only way to secure a stable majority would be for the Left Party and the conservatives to team up. That unprecedented agreement would result in a coalition stretching from the far left of the political spectrum to the center right, and it appeared to be ruled out by Ms. Merkel’s party on Sunday night. The alternative could mean a left-leaning minority government tolerated by the conservatives.
In Western Germany, the AfD has flatlined and seems close to imploding. But in the East, it has become deeply embedded at a grass-roots level, establishing itself as a leading political force. Indeed, it came in first on Sunday among younger voters, exit polls showed.
The party’s presence in state legislatures has already changed the political atmosphere, observers say. In Germany’s parliamentary system, the opposition has significant power to influence debate.
The party’s entry into the legislature in 2014 led to a more aggressive, raw tone in the overall debate, said Ulrich Sondermann-Becker, who has covered the statehouse for the public broadcaster MDR for nearly two decades.
“It has even come to pushing matches,” he said.
Thuringia played a major role in World War II Germany. The Buchenwald concentration camp, where 56,000 people were killed, was 12 miles east of the state capital, Erfurt. It was home to the engineering company Topf & Sons, which developed and produced the crematory ovens used at Auschwitz.
For decades, the prominence of such reminders rendered people wary of the dangers of nationalism and extremist rhetoric, Mr. Ramelow, the governor, said before the election.
“There was always a moral red line that prevented people here identifying with extremist parties, and that was the Holocaust,” he said. But since the AfD has gained strength, he said, that line has increasingly been erased.
“Mr. Höcke is to blame,” the governor said.
Stefan Möller, a spokesman for the AfD in Thuringia, said the party’s language was purposefully strong, to broach uncomfortable topics. “We serve as an icebreaker,” he said.
Mr. Möller also said the strong language was necessary because other parties had refused to work with his party.
“You can’t ignore a party that is as large as the AfD,” he said.
Among the AfD’s supporters, especially in the former East Germany, there is a feeling of frustration with what many see as a lack of understanding among politicians about the upheaval and economic hardships many endured after Communism collapsed.