German chancellor Angela Merkel’s conservative allies have lost their absolute majority in Bavaria’s state parliament by a wide margin in a regional election, a result that could cause more turbulence within the national government.

The Christian Social Union (CSU) took 37.2% of the vote, down from 47.7% five years ago.

It was the party’s worst performance since 1950 in a state vote in Bavaria, which it has traditionally dominated.

Constant squabbling in Ms Merkel’s national government and a power struggle at home have weighed on the CSU.

It is traditionally a touch more right-wing than the chancellor’s party and has taken a hard-line on migration, clashing with Ms Merkel on the issue.

Germany Election
Horst Seehofer, chairman of the CSU, after his party lost in the Bavarian state election (/Kerstin Joensson/AP)

There were gains for parties to its left and right. The Greens won 17.5% to secure second place, double their support in 2013.

The far-right Alternative for Germany, or AfD, entered the state legislature with 10.2% of the vote.

Meanwhile, the centre-left Social Democrats, Ms Merkel’s other national coalition partner in Berlin, finished in fifth place with a disastrous 9.7%, less than half what they received in 2013 and their worst in the state since the Second World War.

The CSU has governed Bavaria, the prosperous south-eastern state that is home to some 13 million of Germany’s 82 million people, for more than six decades.

Needing coalition partners to govern is itself a major setback for the party, which exists only in Bavaria and held an absolute majority in the state parliament for all but five of the past 56 years.

“Of course this isn’t an easy day for the CSU,” the state’s governor, Markus Soeder, told supporters in Munich, adding that the party accepted the “painful” result “with humility”.

Germany Election
The Greens celebrate in Munich, Germany (Kerstin Joensson/AP)

Pointing to goings-on in Berlin, Mr Soeder said, “It’s not so easy to uncouple yourself from the national trend completely.”

Still, he stressed that the CSU emerged as the state’s strongest party with a mandate to form the next Bavarian government.

He said his preference was for a centre-right coalition. That would see the CSU partner with the Free Voters, a local conservative rival that made modest gains to win 11.6%.

The Greens, traditionally bitter opponents of the CSU with a more liberal approach to migration and an emphasis on environmental issues, are another possible partner.

A pro-business party, the Free Democrats, scraped into the state legislature with 5.1% support but will not be needed to form a coalition.

The CSU has long leveraged its strength at the state level to punch above its weight in national politics. In Berlin, the party is one of three in Ms Merkel’s federal coalition government along with its conservative sister, Ms Merkel’s Christian Democratic Union, and the Social Democrats.

That government has been notable largely for internal squabbling since it took office in March. The CSU leader, interior minister Horst Seehofer, has often played a starring role.

Germany Election
Bavarian governor Markus Soeder (Matthias Schrader/AP)

Back in Bavaria, a long-running CSU power struggle saw the 69-year-old Mr Seehofer give up his job as state governor earlier this year to Mr Soeder, a younger and sometimes bitter rival.

Mr Seehofer has sparred with Ms Merkel about migration on and off since 2015, when he assailed her decision to leave Germany’s borders open as refugees and others crossed the Balkans.

They argued in June over whether to turn back small numbers of asylum-seekers at the German-Austrian border, briefly threatening to bring down the national government.

“Of course, I as party leader bear a share of responsibility for this result,” Mr Seehofer said, adding that he was prepared to discuss consequences for Sunday’s outcome, but not immediately.

It remains to be seen whether and how the Bavarian result will affect the national government’s stability or Ms Merkel’s long-term future.

Any aftershocks may be delayed because another state election is coming on October 28 in neighbouring Hesse, where conservative Volker Bouffier is defending the 19-year hold of Ms Merkel’s CDU on the governor’s office.

Mr Bouffier has criticised the CSU for diminishing people’s trust in Germany’s conservatives.

The CDU’s general secretary, Annegret Kramp-Karrenbauer, said the party must show discipline and focus on Hesse. She acknowledged that the national government’s woes have been unhelpful.

“It is totally undisputed that the way we have treated each other in the coalition, and also the way we argued with each other in the summer, was anything but inspiring for the state election in Bavaria,” she said.