The European Court of Human Rights has ruled that Belgium's ban on wearing face veils in public does not violate the European Convention on Human Rights.

The court ruled today that the restriction was justified because it was an attempt to protect "the rights and freedoms of others" which "sought to guarantee the conditions of living together". It said the ban could be considered "proportionate" to those aims and "necessary in a democratic society".

In 2011 Belgium banned the wearing of clothing which obscures the wearer's identity in public places. This included partial or total face veils.

Two women who wanted to wear the niqab in public argued that the law had violated their rights under articles eight (right to respect for private and family life), nine (freedom of thought, conscience and religion) and 14 (prohibition of discrimination). The niqab, a burka most often worn by Muslim women, covers the whole body except the eyes.

Belgian national Samia Belcacemi said she had removed her veil in response to the law, fearing she might be fined or jailed. Moroccan national Yamina Oussar said she had chosen to stay at home, curtailing her social life.

The court said the ban was "controversial and undeniably carried risks in terms of the promotion of tolerance in society". But it ruled that no violation of the claimants' rights had taken place.

It said the law's drafting history showed that the authorities were attempting to promote public safety, gender equality and "a certain conception of living together". It said the state authorities were "better placed than an international court to assess the local needs and context".

And it said the punishment for breaking the law could be viewed as proportionate to the aims it was trying to promote. Those who defy the ban can be fined; repeat offenders can be imprisoned. But the law is classified as a "hybrid" in Belgian law, meaning that municipal authorities can take alternative measures to uphold it.

The court also came to a similar judgement today over a bylaw banning face veils in the Belgian municipalities of Pepinster, Dison and Verviers.

In 2011 France became the first European country to issue a national ban on full-face veils in public. Since then Bulgaria and parts of the Netherlands, Switzerland, Germany, Spain and Italy have followed suit.

Earlier this year the German parliament supported a draft law banning women working in the civil service, judiciary and military from wearing full-face Islamic veils. Last month Norway's government proposed a burka ban in schools and universities. And the case comes as several French cities consider whether to introduce bans on the burkini, a full-body swimsuit, over the summer.

In 2014 the ECHR rejected arguments that the French ban on veils breached religious freedom and human rights. And in March the European Court of Justice ruled that workplace bans on the wearing of "any political, philosophical or religious sign", such as headscarves, did not necessarily constitute direct discrimination. But it added that such bans must be based on internal company rules requiring all employees to "dress neutrally".

The National Secular Society has serious concerns about the wearing of the burka and agrees that in some contexts it should be prohibited. However the NSS does not support legal attempts to ban it in all public places.

Stephen Evans, NSS campaigns director, said: "No woman should be forced to hide behind a burka. It is vital for civil society to expose the deeply intolerant view of women which the garment often symbolises. And freedom of religion is not absolute.

"But bans on clothing in public places are an unconvincing response to misogynistic attitudes.

"It should be stressed that the court's judgement is not a blank cheque to ban the burka across Europe. States that pass laws against face coverings are required to show that they have a legitimate aim in doing so and that they have handled the issue proportionately."