Chancellor Angela Merkel's allies, the CSU, have suffered huge losses in Bavarian state elections.
The Christian Social Union (CSU) won 37.3 percent of the vote, preliminary results showed, losing its absolute majority for only the second time since 1962.
It lost votes to the far-right and the ecologist Greens in a setback that raises tensions within Germany's crisis-prone national government.
"We accept the result with humility," Bavarian premier Markus Soeder told a gathering of his party.
He added that the CSU nonetheless wanted to form a stable government as soon as possible.
The result, which saw the pro-immigration Greens come second and the far-right Alternative for Germany (AfD) enter the state assembly for the first time, means the CSU will need to form a coalition - a humiliation for a party used to ruling alone.
The Greens, who more than doubled their share of the vote to 17.8 percent, attracted support from more liberal CSU voters and from those who traditionally vote for the left-leaning Social Democrats (SPD), who won just 9.5 percent.
Without naming Ms Merkel, SPD leader Andrea Nahles said the "poor performance" of the federal government in Berlin, where the SPD is in a coalition with the conservatives, was one of the reasons for her party's weak showing in Bavaria. "It's clear that something has to change," she said.
CSU leader Horst Seehofer has been a thorn in Ms Merkel's side since her 2015 decision to open Germany's borders to more than 1 million migrants, gradually shifting his party to the right in an ultimately futile effort to counter the rise of the AfD.
Michael Weigl, political scientist at the University of Passau, said personal attacks on Ms Merkel by Mr Seehofer - who is the federal interior minister - and his hard-line rhetoric against asylum seekers were to blame for the CSU's weak result.
"This created a political climate of polarisation from which the Greens and the AfD benefited the most, with their clear stances on immigration," Mr Weigl said. "For the CSU, this strategy backfired."
Asked if he would resign as CSU leader, Seehofer told broadcaster ZDF he was not ruling this out but there were many reasons for the party's weak result which had to be analysed.
The AfD won 10.7 percent of the vote, the preliminary results showed. The Free Voters, a protest party that is the CSU's most likely coalition party, won 11.6 percent. The CSU has ruled out an alliance with the AfD.
Divisions between Ms Merkel's Christian Democratic Union and the CSU - conservative sister parties - have widened since an inconclusive national election forced them into a coalition in March with the Social Democrats.
The Bavarian election is followed in two weeks by another test for Ms Merkel's conservative alliance. Her CDU is likely to remain the largest party but lose votes in an election in the western state of Hesse, home to the financial centre of Frankfurt.
The CDU then holds its annual congress in December, when Ms Merkel will seek re-election as party chairwoman - a bid senior conservatives have backed despite the parliamentary party ousting her ally, Volker Kauder, as leader last month.
Before the Bavarian vote, Merkel urged her CDU and CSU allies to end their infighting.
Her fourth and probably final government has already come close to collapsing twice, in arguments over immigration and a scandal over a former spymaster.