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.