BERLIN (Reuters) - German Chancellor Angela Merkel vowed on Monday to restore trust in her government after her conservative allies suffered heavy losses in a regional election, which their far-right foes hailed as “an earthquake” that would rock the ruling coalition.

The Christian Social Union (CSU), the sister party of Merkel’s own Christian Democrats (CDU), slumped to its worst result in almost 70 years in Sunday’s election in Bavaria. The chancellor’s other coalition partner, the centre-left Social Democrats (SPD), saw its support halved.

“My lesson from this is that I, as chancellor, must make sure that trust is won back. I will work on that with as much vigour as I can,” she said at an event of the BGA trade body.

CSU leader Horst Seehofer, who is also interior minister in Merkel’s loveless coalition, had hoped his anti-immigration rhetoric and criticism of Merkel’s liberal asylum policies would help his party fend off a threat from the far-right in Bavaria.

His strategy backfired as the CSU, which has ruled Bavaria for almost six decades, bled votes to the far-right Alternative for Germany (AfD) party and the ecologist Greens in equal measure. On Monday, he appeared to extend an olive branch.

“We will do our bit to ensure that the coalition can continue to do its work in a stable manner despite some of the comments that were made yesterday,” Seehofer told reporters.

He was referring to angry CSU delegates who blamed their party’s dismal showing on Merkel’s decision in 2015 to welcome some one million, mainly Muslim, asylum seekers, which has fuelled the rise of the AfD.

Merkel said the CSU had lost its absolute majority in the Bavarian parliament even though the regional economy was doing well.

“This shows that even a good economic situation and almost full employment are not sufficient if trust is lacking,” Merkel said.

The Bavarian economy grew by 2.8 percent last year, outpacing the national rate of 2.2 percent. It also has the lowest unemployment rate in Germany, 2.8 percent, compared with just over 5 percent nationally.

The AfD gleefully seized on the election outcome as a sign of a broader malaise for Merkel’s coalition, which has been shaken by disputes, including over immigration, since it took power seven months ago.

“We are very pleased because the goal for the Bavaria state election was to send an earthquake towards Berlin,” Martin Sichert, AfD leader in Bavaria, told a news conference. “This earthquake happened .... We are now excited to see what the consequences will be here in Berlin.”

The CSU also lost support to the Free Voters, a protest party of mainly conservative independents.

German Chancellor Angela Merkel, German Defence Minister Ursula von der Leyen, Volker Bouffier and Armin Laschet, Minister President of North Rhine-Westphalia attend a Christian Democratic Union (CDU) leadership meeting in Berlin, Germany, October 15, 2018. REUTERS/Fabrizio Bensch

In Bavaria, the CSU will now try to form a coalition either with the Free Voters - its preferred option - or with the Greens who are ideologically distant.

“PAINFUL”

The ruling coalition was borne of necessity rather than choice after an inconclusive general election in September 2017.

The Bavarian election was also a wake-up call for the SPD, which saw its support halve to just under 10 percent, prompting a discussion over the sustainability of its alliance at national level with Merkel’s conservative bloc.

SPD members are still bitter over their leaders’ decision to join the government after vowing before the 2017 election to sit in opposition if they lost to the conservatives. They are now demanding consequences.

SPD leader Andrea Nahles blamed her party’s losses in Bavaria on infighting at national level between the CDU and CSU.

“It is obvious that the whole style of our cooperation must change,” she told reporters. “We urgently need to work on the style and communication and also on substantive progress.”

Polls suggest the ruling parties will again be punished in two weeks’ time in an election in the western state of Hesse, where they are expected to lose voters to the AfD and the Greens.

The state is ruled by Merkel’s CDU in a coalition with the Greens and a slump in support for the conservatives there would almost certainly further weaken the chancellor’s authority.

Merkel, who has been in power since 2005 and is Europe’s most powerful leader, then faces further potential pitfalls in the form of a CDU conclave and the party’s annual congress in early December.

The 64-year-old Merkel has won support from key conservatives in her bid for re-election as CDU chairwoman at the congress. But this could change if the CDU loses Hesse to an SPD-Greens coalition.

“If the CDU loses the government in Hesse, this will probably start a discussion within the CDU about Merkel’s position,” wrote mass-selling newspaper Bild.