A Hungarian village which banned openly supporting same-sex marriage, as well as building mosques and wearing headscarves, has been told it can’t do that.

Laszlo Toroczkai, the mayor of southern Hungarian border village Asotthalom, posted on Facebook last year about the proposals which were adopted by his council.

He wrote: “Instead of looking for a scapegoat, I offer an immediate solution, a defense against the forced mass resettlement [of migrants] by Brussels.”

Other than two abstentions, all of the board voted in favour of the proposed new rules.

The Constitutonal Court in Budapest has now ruled that the policy violates human rights.

The court ruled that the policy planned to “limit directly the freedom of conscience and religion, as well as freedom of speech”.

“Today the Asotthalom village council adopted my proposal – which is an action package – to defend our community and traditions from any plan for the outside resettlement [of migrants]. All that needs to be done is for the rest of Hungary’s municipalities to adopt our preventative action package, and with that we will have defended our homeland,” said the mayor on announcing the policy.

The measures put in place by Toroczkai ban the construction of mosques, or other places of worship excluding the Catholic Church.

The village also banned the call to prayer, all face coverings including the hijab, niqab and burqa, and the burkini.

Mayor Toroczkai said the plans protect the village from “extreme liberalism” from the West.

He is from the Jobbik party, which claims to protect “Hungarian values and interests,” but which has in the past been accused of racism, homophobia and anti-Semitism.

“I want to be an example to other pioneering local authorities on how to protect themselves from external resettlement or any other subversive intentions,” he said.