MUNICH (Reuters) - Around 25,000 people braved the rain in Munich on Sunday to protest the hardline immigration stance of Chancellor Angela Merkel’s Bavarian allies three months before they face a tough state election in Bavaria.

The protest is another sign of the Christian Social Union’s (CSU) waning popularity after an Infratest poll published last week put its support in Bavaria at 38 percent, compared with the 47.7 percent it secured in a 2013 regional election.

March organizers said in a statement they were demonstrating against the “irresponsible divisive politics” of top members of the CSU which governs Bavaria and is the sister party to Merkel’s Christian Democrats (CDU).

They mentioned CSU leader and interior minister Horst Seehofer and CSU Bavarian state premier Markus Soeder and said they were taking a stand against a “politics of fear” and a societal shift to the right.

Seehofer’s immigration stance nearly brought down Merkel’s government earlier this month in a dispute over migration.

By staking out a hard line, Seehofer is trying to bolster his party in the vote, in which the CSU faces a stiff challenge from the far-right.

Seehofer last week deflected blame for the suicide of an Afghan man among a group deported to Kabul, after opponents called for his resignation for boasting that the deportations took place on his birthday.

“I want to speak out against the inhuman statements that have recently come to light from leading CSU politicians,” said Axel Weingaertner, one of the demonstrators. “It’s unacceptable.”

Numerous groups, including the Social Democrats (SPD) - junior partner to the conservatives in the federal governing coalition - the Greens, the radical Left, civil society organizations, church groups and groups of volunteers who work with refugees, had urged people to join the demonstration.

Police estimated the number who took part.

The CSU said on Twitter the protest was “political agitation” and added: “The people in Bavaria know what they have in the CSU.”

The Infratest dimap poll showed support for the anti-immigrant Alternative for Germany (AfD) in the prosperous southern state at 12 percent. The AfD, which has seen its popularity soar due an influx of 1.6 million migrants since mid-2014 - is expected to enter the state parliament there for the first time in October.