A local court dealt a humiliating blow to the mayor of the German city of Augsburg after overruling his attempt to ban the leader of Alternative for Germany (AfD) from giving a speech, thus ensuring maximum publicity for the event.

Kurt Gribl, a member of Angela Merkel’s sister-party the Christian Social Union, tried to ban Frauke Petry from speaking at the city’s town hall after she said border guards should be allowed to use firearms against illegal migrants as a last resort.

Mrs Petry said last month that a border police offer “must stop illegal border crossings, and also make use of his firearm if necessary,” before clarifying: “No policeman wants to fire on a refugee and I don’t want that either”.

However, Mr Gribl decided the comments were “unconstitutional” and earlier this week announced he was banning Mrs Petry from the building.

Now, in a reversal of fortune, Augsburg’s Administrative Court has ruled Mr Gribl’s ban is in fact unconstitutional.

The liberal-left Süddeutsche Zeitung reports through gritted teeth that the decision is an “embarrassing defeat” for the city’s mayor.

“The remarks by AfD chief Frauke Petry about using firearms against refugees were politically groundless and morally reprehensible,” the paper says. “Nevertheless, Petry’s comments are covered by the right to free speech.”

“Gribl’s approach,” it adds, “was not only undemocratic but also inept: Petry is now the winner…”

AfD supporters will now feel vindicated in their belief the political establishment is trying to silence them, the paper says, before concluding: “The political damage [Gribl] has done is great.”

Despite receiving almost universally negative headlines in the mainstream press, AfD continues to surge in opinion polls, with one poll even suggesting the party will hold the balance of power in at least one German state after next month’s local elections.