By Sarah Marsh and Thomas Escritt
BERLIN (Reuters) -Voters dealt the parties of Chancellor Olaf Scholz's fractious centre-left coalition a sharp rebuke in the key states of Bavaria and Hesse on Sunday, with economic woes and migration fears boosting the opposition conservatives and the far right.
The elections saw the far-right Alternative for Germany (AfD) party burst out of its post-industrial eastern strongholds to score its best-ever result in a western state, in Hesse, and come in second place in both states.
All three parties in Scholz's federal coalition - his Social Democrats, the Greens and the pro-business Free Democrats (FDP) - did worse than five years ago in the states that together account for around a quarter of the German population.
The FDP looked on track to fail to reach the 5% threshold to enter parliament in Bavaria, and possibly Hesse too.
Analysts said this would further stoke tensions in a coalition that has struggled to find common ground, with Scholz accused of failing to show the leadership needed to impose order and tackle crises, from the war in Ukraine to the green transition.
"If necessary the FDP needs to be ready to leave" the coalition, Thomas Kemmerich, head of the FDP in the eastern state of Thueringen that is to hold its own election next year, was quoted as saying by German media outlet The Pioneer. "This cannot be a taboo."
Jens Spahn, a senior legislator for the conservative Christian Democrats (CDU), said that rarely had a government been given such a comprehensive slapdown.
"And rarely has it been so clear: whether on migration, the economy or climate policy, people want a different politics," Spahn said.
In Hesse, home to the glittering towers of financial capital Frankfurt, the CDU were forecast to get 34.6% of the vote for the state legislature, likely allowing them to govern for another term, projections for ARD state broadcaster at around 2200 CET showed.
The SPD's 15.1% - down 4.7% on its 2018 results - was a personal blow to Interior Minister Nancy Faeser, whose campaign to head the state was dogged by criticism of her handling of a surge in irregular migration.
The failure of the far-left Left party to reach the 5% threshold necessary to remain in the state parliament in Hesse added to the broader shift to the right.
Meanwhile the CDU's sister party the Christian Social Union (CSU), which has run Bavaria since 1957, was projected to win 36.4% of the vote in that state - its worst result since 1950, although only a fraction below 2018's.
This would likely weaken the potential claim of CSU leader Markus Soeder to the chancellor candidacy for the conservatives ahead of the 2025 federal elections, analysts said.
COALITION DRUBBING
The CSU is expected to continue its coalition with the populist Free Voters on 15.3%. They and the AfD were the only parties to make gains in the Bavaria election.
The AfD was on track for 18.6% in Hesse and 16% in Bavaria, compared with 13.1% and 11.6% respectively in 2018, confirming the political ascendancy of a party created just 10 years ago.
The nationalist, anti-migrant AfD is currently polling in second place nationwide, up from fifth in the 2021 election, in a shift that could make it harder for Germany to form stable majorities given that other parties refuse to work with it.
Approval of Scholz's government remains at its lowest level since it took office in December 2021, according to the ARD-Deutschland Trend survey, with four out of five Germans dissatisfied with its work.
"We are right in the middle of the federal legislative term, where it is not unusual for the government to have low approval ratings and lose state elections," said Philipp Koeker, political scientist at the University of Hanover.
Still, coalition parties were likely to continue to follow increasingly separate paths to focus on issues relevant to their core electorate in response to the bad results, he said, while all taking a tougher stance on migration.
"We must in the future better communicate SPD projects and be more visible," SPD lawmaker Sebastian Roloff told German outlet Handelsblatt.