ABENSBERG, Germany (Reuters) - For decades the conservative Christian Social Union has run the state of Bavaria - famous for BMWs, beer festivals and the Bayern Munich soccer club - as it sees fit, ignoring the vagaries of German national politics.

Bavarian State Prime Minister Markus Soeder of the Christian Social Union (CSU) reacts as balloons fall during an election rally at one of Bavaria's oldest fairs, the Gillamoos Fair in Abensberg, Germany September 3, 2018. Picture taken September 3, 2018. REUTERS/Michael Dalder

That may change next month, when an election risks upsetting the party in a development that would also have grave implications for Chancellor Angela Merkel’s government in Berlin, where the CSU is an important ally.

Once poor, Bavaria enjoyed remarkable post-war economic modernization under the CSU while retaining its regional identity - a ‘Laptops and Lederhosen’ formula that has earned the state-based party a unique role as a powerful conservative force in national politics.

Now that exceptionalism is under threat.

At the Oct. 14 state election, the CSU is likely to lose its absolute majority - with which it has ruled Bavaria for most of the post-war period, and which has allowed the party to punch above its weight as a partner in successive German governments.

The main reason for the slide: the rise of the anti-immigration Alternative for Germany (AfD), which has divided the electorate and is threatening the Bavarian exceptionalism with which the CSU has for decades been synonymous.

In response, CSU leaders are trying to revive the feeling that their party represents the essence of Bavaria: a distinct identity backed by economic success that has produced the lowest jobless rate - 2.9 percent - of any German state.

“Germany is so successful because of us Bavarians!” state premier Markus Soeder, 51, roared on Monday to a packed beer tent in Abensberg, a sleepy town north of Munich, which comes alive once a year for the Gillamoos fair - a traditional festival claiming roots dating to 1313.

Pushing all the regional identity buttons he could, Soeder arrived wearing a traditional Bavarian jacket to the sound of a brass band belting out the Bayerischer Defiliermarsch, a 19th century march that is Bavaria’s unofficial anthem.

“We need a political anchor, a political compass,” he told 4,000 revelers in the tent. “In Bavaria, that is the CSU - who else?”

“The world is changing but Bavaria remains Bavaria thanks to the CSU,” he bellowed to rapturous applause.

Beyond the beer tent, the message isn’t resonating so well.

Support for the CSU has slumped to 36 percent from the 47.7 percent it scored at the last Bavarian election in 2013.

Slideshow ( 6 images )

Such a low score next month would mark a dramatic decline from the CSU’s peak under Franz Josef Strauss, who led the party to victory in 1974 with 62.1 percent of the vote. As recently as 2003, it still enjoyed 60.7 percent support.

“Only because we are so strong in Bavaria, can we act with the associated confidence at the federal level,” said CSU lawmaker Michael Frieser. “The Bavarian is different, he defines himself through his independence.”

STUMBLING SWAGGER

That swagger saw Bavaria choose not to sign the founding treaty of the Federal Republic of Germany in 1949, which it felt did not grant sufficient powers to the states, though it nevertheless decided to join the republic.

More recently, Bavaria’s economic strength has allowed the CSU to exert influence disproportionate to its size in its alliance - ‘the Union’ - with Merkel’s Christian Democratic Union (CDU), which does not field candidates in Bavaria.

Even with the CSU’s sinking ratings, a bid by the party’s Manfred Weber to succeed Jean-Claude Juncker as EU chief executive has been backed by Merkel.

But CDU allies of the chancellor are frustrated by what they see as a hostile and divided CSU leadership, unnerved by its diminishing support in Bavaria. CDU figures fear a weak CSU election result could cause more friction with their south German ally.

This summer, CSU leaders pushed their alliance with the CDU close to breaking point by demanding a harder line on immigration - a lurch to the right in response to AfD’s gains - before switching course and trying to reclaim the center ground.

Soeder rammed home the centrist message in Abensberg, accusing the AfD of marching “side by side” with far-right hooligans in Chemnitz, a city in eastern Germany where violent protests have followed the arrest of two migrants over the fatal stabbing of a German man.

The flip-flopping is dividing the CSU’s traditional broad base of support. Some moderates, unhappy at the party’s move to the right over immigration, are turning to the ecologist Greens, which enjoy 15 percent support. Hardliners are drawn to the AfD, currently polling 14 percent.

In Abensberg, AfD activist Michael Rutkowski, 61, said many voters are worried about their children’s prospects even if Bavaria is doing well now. The state is home to multinationals Siemens, BMW, Audi, Adidas, and Allianz as well as a host of tech start-ups.

Merkel’s 2015 decision to open Germany’s borders to one million refugees was “irresponsible”, Rutkowski said, adding: “People don’t feel safe anymore. They don’t trust the old politicians anymore.”

COMEBACK RECORD

The CSU leaders’ hard line on immigration is motivated by Strauss’s mantra that there must never be a democratic, legitimate party to the CSU’s right.

Under Strauss, who led the CSU from 1961 to 1988, the party nurtured strong support from a broad political spectrum, and developed the sense of regional independence that stems from Bavaria’s history as a kingdom.

“What is happening now is the CSU is dividing Bavaria,” said Manfred Guellner, chief of polling institute Forsa. The CSU’s hard-nosed approach with Merkel on immigration had only boosted the AfD and driven away liberal CSU voters, he added.

An order from Soeder for all regional government buildings to display a cross hasn’t won back conservatives either.

In a recent Forsa survey in Bavaria, one third of CSU voters said they would rather vote CDU than CSU if they could, Guellner said. Mass-selling daily Bild has pointed out that an “anti-CSU alliance” could become a danger for the party.

“The fact that possibility is even being thought about is a catastrophe for the CSU,” said Guellner.

The CSU has been here before. In 1954, it lost to a coalition led by the left-leaning Social Democrats, but regained power in 1957. In 2008, the CSU lost its absolute majority but won it back in 2013.

“Not everything is going to turn to ashes after the election in October,” said Matthias Dilling at Oxford University, an expert on Christian democratic parties. “The CSU has gone through very difficult times in its history.”

With each comeback, the party’s on-the-ground network has been crucial.

In Abensberg, district CSU chief Martin Neumeyer, 63, is appealing to voters with the motto “we are listening”.

“The CSU must fight,” he said. “We don’t have a minute or a day to lose.”