There are only four minarets in Switzerland
Swiss voters have supported a referendum proposal to ban the building of minarets, official results show.
More than 57% of voters and 22 out of 26 cantons - or provinces - voted in favour of the ban.
The proposal had been put forward by the Swiss People's Party, (SVP), the largest party in parliament, which says minarets are a sign of Islamisation.
The government opposed the ban, saying it would harm Switzerland's image, particularly in the Muslim world.
But Martin Baltisser, the SVP's general secretary, told the BBC: "This was a vote against minarets as symbols of Islamic power."
The BBC's Imogen Foulkes, in Bern, says the surprise result is very bad news for the Swiss government which fears unrest among the Muslim community.
Our correspondent says voters worried about rising immigration - and with it the rise of Islam - have ignored the government's advice.
In a statement, the government said it accepted the decision.
It said: "The Federal Council (government) respects this decision. Consequently the construction of new minarets in Switzerland is no longer permitted."
Justice Minister Eveline Widmer-Schlumpf said: "Concerns [about Islamic fundamentalism] have to be taken seriously.
"However, a ban on the construction of new minarets is not a feasible means of countering extremist tendencies."
She sought to reassure Swiss Muslims, saying the decision was "not a rejection of the Muslim community, religion or culture".
Switzerland is home to some 400,000 Muslims and has just four minarets.
After Christianity, Islam is the most widespread religion in Switzerland, but it remains relatively hidden.
There are unofficial Muslim prayer rooms, and planning applications for new minarets are almost always refused.
Supporters of a ban claimed that allowing minarets would represent the growth of an ideology and a legal system - Sharia law - which are incompatible with Swiss democracy.
But others say the referendum campaign incited hatred. On Thursday the Geneva mosque was vandalised for the third time during the campaign, according to local media.
Amnesty International said the vote violated freedom of religion and would probably be overturned by the Swiss supreme court or the European Court of Human Rights.
The president of Zurich's Association of Muslim Organisations, Tamir Hadjipolu, told the BBC: "This will cause major problems because during this campaign mosques were attacked, which we never experienced in 40 years in Switzerland.
"Islamaphobia has increased intensively."
And there was dismay among Switzerland's Muslims upon hearing the result.
Farhad Afshar, president of the Coordination of Islamic Organisations in Switzerland, said: "The most painful thing for us is not the ban on minarets but the symbol sent by this vote.
"Muslims do not feel accepted as a religious community."
Elham Manea, co-founder of the Forum for a Progressive Islam, added: "My fear is that the younger generation will feel unwelcome.
"It's a message that you are not welcome here as true citizens of this society."
Sunday's referendum was held after the SVP collected 100,000 signatures from voters within 18 months calling for a vote.
In recent years countries across Europe have been debating how best to integrate Muslim populations.
France focused on the headscarf, while in Germany there was controversy over plans to build one of Europe's largest mosques.