BERLIN (AP) — An often-awkward conservative ally of German Chancellor Angela Merkel is to step down as Bavarian governor in favor of a younger rival, attempting to end a power struggle that has been an unwelcome distraction as Merkel tries to form a new government.

Horst Seehofer has been leader of the Christian Social Union party and Bavaria’s governor since 2008. The CSU is the Bavaria-only sister to Merkel’s Christian Democratic Union, and one of three parties in Germany’s outgoing government.

Seehofer said Monday he plans to step down as governor in next year’s first quarter and be succeeded by state finance minister Markus Soeder. But the 68-year-old intends to remain party leader, saying that his decades of political experience could help with “the situation in Berlin.”

Seehofer has been under pressure since the CSU performed poorly in September’s German election. It took 38.8 percent of the vote in Bavaria, 10.5 percentage points fewer than in 2013, losing support to the nationalist Alternative for Germany and the pro-business Free Democrats. That jangled nerves in the party, which faces a Bavarian state election next fall.

Bavarian governor and chairman of the Christian Social party, CSU, Horst Seehofer, arrives for a fraction meeting in Munich, Germany, Monday, Dec. 4, 2017. (AP Photo/Matthias Schrader)

Seehofer’s long-running rivalry with Soeder, 50, re-erupted — casting doubts on the CSU’s stability as Merkel and Seehofer struggle to put together a new government in Berlin. After talks on an alliance with two smaller parties collapsed, those efforts center on whether the center-left Social Democrats are willing to renew their governing coalition of the past four years with the conservatives.

On Monday, the Social Democrats’ leadership approved a motion stating that the party is prepared to hold talks on “whether and in what form (it) can support a new government,” and that those talks would be “constructive and open in terms of results.”

However, leaders will have to seek endorsement from a party conference later this week — after insisting until recently that the party, which suffered a disastrous election defeat in September, would go into opposition.

The Seehofer-Soeder rivalry has been based on personal antipathy rather than significant political differences. Seehofer was a leading critic of Merkel’s decision in 2015 to allow in large numbers of migrants, feuding with the chancellor until the two put aside their differences earlier this year.

The election result “had its main causes in Berlin,” Soeder said Monday.

The CSU, an important source of conservative votes in national elections, has always taken pride in punching above its weight in national politics but its top priority is defending its dominance in Bavaria. It tends to take a more socially conservative stance than Merkel’s CDU.

Soeder said Monday’s decision offers an opportunity to unite the party. “We as the CSU must start talking more with each other than about each other,” he said.