The House of Representatives has come out against a proposal by rightwing political parties to ban minarets.
A majority also rejected calls by the centre-left to declare the people's initiative invalid. The other parliamentary chamber, the Senate, still has to discuss the issue.
The initiative, launched by members of the rightwing Swiss People's Party and a small ultra-conservative Christian party, was handed in with 113,540 valid votes last year. It will be put to a nationwide vote at a later date.
Muslim organisations have expressed their concern about the initiative, which has been rejected by the cabinet.
More than 50 parliamentarians took part in Wednesday's debate which lasted for nearly six-hours. In the end, the House voted 129 against 50 to rebuff the initiative.
An overwhelming majority said the proposal violated human rights and international law and jeopardised the peaceful coexistence of religions.
"The initiative takes aim at the Muslim community," warned Bea Heim of the centre-left Social Democratic Party. Other speakers described the plan as irresponsible, "an insult for Muslims", scaremongering or "a campaign to instigate hatred".
"I'm not willing to provide fuel for arsonists," said Ueli Leuenberger of the Green Party, when he took the podium to explain his position.
Social Democrat Andreas Gross criticised the government for failing to nullify the initiative at an early stage. He called on parliament to "act bravely and to put respect for religious freedom over political opportunism".
But his appeal was barely heeded by members outside the centre-left.
For their part, People's Party parliamentarians argued the initiative was the right answer to counter an alleged "Islamisation" of the western world. Minarets were described as claims to political dominance rather than religious symbols.
"It's time to counter the pretension to power," said Jasmin Hutter, who also slammed Islam as intolerant and repressive towards women.
"Minarets, muezzins [people at the mosque who lead the call to prayer] and Sharia law have to be seen in the same context," added Walter Wobmann.
Numerous rightwing parliamentarians slammed Islamic values as incompatible with the Christian ideals and Switzerland's democratic principles.
They also warned that Muslim extremists would use mosques for criminal activities.
During a heated debate Ulrich Schlüer accused opponents of trying to ignore the concerns of all those citizens who signed the people's initiative.
Representatives of the centre-right Christian Democratic Party called for more dialogue between the religions.
"I dread the forthcoming campaign by the People's Party," said Kathy Riklin.
Jacques Neirynck was among several speakers who expressed their feelings of disgust and shame over demands for a minaret ban and Wednesday's parliamentary debate.
"The initiative is dangerous, populist and damages Switzerland's reputation. I wish it was not on the table," he said.
But several speakers also pointed out that the initiative had to be taken seriously because it reflected serious concerns of citizens.
It was launched in the wake of debates at a local level in parts of German-speaking Switzerland over the planned construction of minarets. At present only four mosques in the county have such spires.
Justice Minister Eveline Widmer-Schlumpf repeated the government's rejection of the initiative.
"Switzerland would be in violation of international obligations and its credibility would be seriously dented," she told the House.
However, she said the initiative did not violate international law.
Widmer-Schlumpf added that a minaret ban would endanger the peaceful coexistence of Christians and Muslims.
"Minarets are religious symbols. A ban is an infringement of religious freedom," she said.
She said the debate had shown that some supporters of a minaret ban were prepared to use unfair and dishonest arguments.
The initiative seeks a ban on minarets, according to supporters of the initiative, but it appeared that many speakers raised general objections against Islam, Widmer-Schlumpf said.
Urs Geiser, swissinfo.ch
In Switzerland, more than three-quarters of the population are Christians - 42% are Catholic, 35% Protestant and 2.2% other Christian denominations.
With more than 350,000 members (4.3%), Islam is the second-largest religion in the country. Twelve per cent of Muslims have a Swiss passport. They come mainly from the Balkans and Turkey.
The Jewish community has about 18,000 members (0.2%), of which 80% are Swiss.
There are 28,000 Hindus and 21,000 Buddhists in the country.
A minaret is a tower, traditionally part of a mosque, with a balcony from which a muezzin calls Muslims to prayer. In modern mosques, the minaret is equipped with loudspeakers.
In Switzerland, only the mosques in Geneva, Zurich and Wangen near Olten have a minaret, Winterthur's mosque only has a small one. But the call to prayer is not made from these minarets.
Request for minarets in at least two other towns, Langenthal and Wil, led to heated debates at the local level.