Swiss voters on Sunday narrowly backed a ban on full-face coverings in public places.
It was a decision praised by supporters as protection against radical Islam but called discriminatory by opponents.
Official results showed that 51.2 per cent of voters, and a clear majority of federal Switzerland's cantons, supported the proposal.
The vote came after years of debate in Switzerland following similar bans in other European countries, and in some Muslim-majority states, despite women in full-face veils being an exceptionally rare sight in Swiss streets.
About 1,426,992 voters were in favour of the ban, while 1,359,621 were against it, on a 50.8 per cent turnout.
The proposal "Yes to a ban on full facial coverings" did not explicitly mention the burqa or niqab.
But campaign posters reading "Stop radical Islam", and "Stop extremism", featuring a woman in a black niqab, which leaves only the eyes showing, were plastered around Swiss cities.
Rival posters read: "No to an absurd, useless and Islamophobic 'anti-burqa' law."
The ban will mean no one can cover their face completely in public, whether in shops or the open countryside.
But there will be exceptions, including for places of worship and for health and safety reasons.
The vote came at a time when face masks are mandatory in shops and on public transport because of the coronavirus pandemic.
Marco Chiesa, head of the right-wing populist Swiss People's Party (SVP), which led the push for a vote, voiced his relief at the result.
"We are glad," Mr Chiesa said on Blick TV. "We don't want radical Islam in our country at all."
The SVP said the vote would protect the cohesion of Switzerland and advance the fight against political Islam, which it said was threatening the country's liberal society.
Roger Nordmann, head of the Socialist legislators in Parliament, estimated that a quarter of the left-wing electorate backed the initiative for secular and feminist reasons.
"No problem has been solved and women's rights have not progressed either," Mr Nordmann told ATS news agency.
"I don't think the cantons are going to set up anti-burqa brigades."
About 150 demonstrators opposed to the ban protested outside the Swiss Parliament in Bern.
In Europe, Switzerland's neighbours France and Austria have banned full-face coverings, as have Belgium, Bulgaria and Denmark.
Other European countries have bans for particular contexts, such as in schools and universities.
The Swiss government and Parliament opposed a nationwide ban.
Justice Minister Karin Keller-Sutter said the result was not a vote against Muslims, and that only a tiny fraction of Muslims would be affected.
A 2019 Federal Statistical Office survey found that 5.5 per cent of the Swiss population were Muslims, mostly with roots in the former Yugoslavia.
Opponents of the ban said the few women who wore the full veil in Switzerland tended to be converts or tourists.
The Islamic Central Council of Switzerland said the ban was "a great disappointment for Muslims".
The council said Islamophobia was now anchored in the Swiss constitution.
It said it would pay any fines incurred for wearing the niqab as long as it had the resources.
Under Switzerland's system of direct democracy, any topic can be put to a national vote as long as it gathers 100,000 signatures in the wealthy country of 8.6 million people.
Such votes take place every three months.
A 2009 vote that banned the construction of minaret towers on mosques sparked anger abroad.
"Swiss voters have once again approved an initiative that discriminates against one religious community in particular, needlessly fuelling division and fear," said Amnesty International Switzerland's women's rights leader, Cyrielle Huguenot.
Rather than liberating women, the ban "is a dangerous and symbolic policy that violates the rights to freedom of expression and religion", Ms Huguenot said.
But Mohamed Hamdaoui, a Bern regional politician and founder of the "A Face Discovered" campaign, said the vote was a "huge relief" that would "say 'stop' to Islamism", not to Muslims, "who obviously have their place in this country".
Two other referendum votes were held on Sunday.
A free-trade agreement with Indonesia narrowly gained approval with 51.7 per cent support.
But a government plan to introduce a federally recognised electronic identity was rejected by 64.4 per cent of the vote.