The German state of Bavaria has passed a law requiring immigrants to respect the “dominant” local culture.

The law provides extra funding for German language classes and for schools to help migrants integrate, however left-wing politicians tried to filibuster it over a clause requiring them to respect Bavaria’s ‘Leitkultur’, or dominant culture.

Critics said the clause would give equal weight to customs such as beer festivals and wearing lederhosen as to concepts such as gender equality.

Markus Rindspracher, leader of the opposition Social Democratic Party, said: “We do not need a guiding culture in this integration law because all this is already covered much better in the Bavarian constitution.”

However, Emilia Müller, the state’s social affairs minister, defending the proposal saying: “It prevents the emergence of parallel societies governed by Sharia, religious codes or tribal customs, instead of our laws and values.”

The opposition eventually failed in filibustering the measure, with the law passing by 95 votes to 47 after a debate lasting a record 16 hours.

Bavaria is governed by the Christian Social Union (CSU), which is in permanent coalition with Angela Merkel’s own party but has taken a much more sceptical line on mass immigration.

Since the large influx of migrants, which saw over one million people enter Germany last year, Bavaria has led the way in cracking down on immigration, becoming the first state to call for the federal government to implement stronger border controls.

In July, Bavaria’s state premier Horst Seehofer took aim at Mrs Merkel’s “We can do this” mantra, which she famously uttered before opening the borders last year.

“I cannot, with the best will, adopt this phrase as my own,” Mr Seehofer said.

“The problem is too big for that and the attempts at a solution thus far too unsatisfactory,” he added. “Restrictions on immigration are a condition for security in this country.”