Switzerland has narrowly voted in favour of banning face coverings in public, including the burka or niqab worn by Muslim women.
Official results showed the measure had passed by 51.2% to 48.8% in Sunday's referendum.
The proposal was put forward by the right-wing Swiss People's Party (SVP) which campaigned with slogans such as "Stop extremism".
A leading Swiss Islamic group said it was "a dark day" for Muslims.
"Today's decision opens old wounds, further expands the principle of legal inequality, and sends a clear signal of exclusion to the Muslim minority," the Central Council of Muslims said in a statement, adding that it would challenge the decision in court.
The Swiss government had argued against the ban saying it was not up to the state to dictate what women wear.
According to research by the University of Lucerne (in German), almost no-one in Switzerland wears a burka and only around 30 women wear the niqab. About 5% of Switzerland's population of 8.6 million people are Muslim, most originating from Turkey, Bosnia and Kosovo.
Swiss people are given a direct say in their own affairs under the country's system of direct democracy. They are regularly invited to vote on various issues in national or regional referendums.
It is not the first time Islam has figured in a Swiss referendum. In 2009 citizens went against government advice and voted to ban the building of minarets - a proposal also put forward by the SVP which said minarets were a sign of Islamisation.
The proposal in Sunday's referendum did not mention Islam directly and was also aimed at stopping violent street protesters from wearing masks. However, the vote was widely referred to as "the burka ban".
The latest proposal predated the coronavirus pandemic, which has meant all Swiss adults having to wear masks in many settings.
Swiss voters give face covering ban a 'jein'
Analysis by Imogen Foulkes, BBC News, Geneva
Was today's vote about all face coverings, from niqabs and burkas to the scarves rioters sometimes pull over their faces?
That's what the Yes campaigners from the Swiss People's Party insisted - but their posters and literature said otherwise, showing threatening looking women in black niqabs, and warning of Islamic extremism.
So does the result mean the Swiss are becoming more extreme? Are they Islamophobic?
Perhaps not. In the end, the ban only just squeaked through. In the past the Swiss People's Party has had much bigger majorities for its populist initiatives, often aimed at restricting asylum and immigration.
It successfully pushed through a ban on minarets in 2009 with a similar campaign to this one. But the debate around face coverings touched all sorts of different nerves. Many Swiss feminists view the burka and niqab as oppressive to women but they also oppose laws telling women what they can and cannot wear.
When it came to voting they were torn. A regular answer from women asked whether they would support the ban was "Jein", a cross between "Ja" (yes) and "Nein" (no). Today's close vote in Switzerland was probably very much a "Jein" as well.
Sanija Ameti, a member of Switzerland's Muslim community, told the BBC that the campaign - and the depiction of Muslim women in the posters - had been upsetting.
"So many Muslims in Switzerland will feel insulted and not part of this society, and pushed into a corner where they don't belong. We don't look like these women in the pictures, we just don't," she said.
However, others in the Muslim community supported the ban.
Imam Mustafa Memeti, from the city of Bern, told the BBC he thought the motivation behind the campaign was "probably Islamophobic". But he said he supported the ban anyway because it could help to emancipate Muslim women in Switzerland.
Ahead of the vote, Walter Wobmann, chairman of the referendum committee and an SVP lawmaker, described Muslim face coverings as "a symbol for this extreme, political Islam which has become increasingly prominent in Europe and which has no place in Switzerland".
"In Switzerland our tradition is that you show your face. That is a sign of our basic freedoms," he said.
Amnesty International spoke out against the proposed ban, calling it "a dangerous policy that violates women's rights, including to freedom of expression and religion".
The wearing of Islamic veils in public has been a controversial topic in other European countries. France banned wearing a full face veil in public in 2011 while the Netherlands, Denmark, Austria and Bulgaria have put in place full or partial bans on wearing face coverings in public.