The Senate has followed the House of Representatives in voting in favour of lifting the ban on screening human embryos for genetic diseases.
Senators voted on Tuesday by 24 to 18 to permit pre-implantation genetic diagnosis (PGD) under strict conditions. The cabinet will now have to draw up new legislation to be submitted to parliament.
The vote comes a week after Switzerland's National Advisory Commission on Biomedical Ethics issued a report recommending that the wholesale ban be replaced by "restricted legalisation".
According to the commission, PGD should be permitted for "couples known to be at risk of transmitting a serious hereditary disease to their offspring...[and] couples undergoing in vitro fertilisation".
"Eugenic practices of all kinds are, however, to be ruled out," it added.
Members of the centre-left Social Democratic Party and centre-right Radical Party supported the lifting of the ban, saying it would bring Switzerland into line with most other European countries.
The procedure is permitted in nations such as Britain, Denmark, Norway, France and Spain.
Anita Fetz of the Social Democrats said the ban intruded on a woman's right to self-determination.
She added that it was neither ethically nor legally comprehensible why embryo screening was forbidden while in utero diagnosis was allowed.
Health Minister Pascal Couchepin also supported the lifting of the ban, emphasising that the diagnosis would only be permitted in certain cases.
Leading the opposition was the centre-right Christian Democratic Party.
It said lifting restrictions would lead to abuse and open the door to the creation of babies selected for their sex or other characteristics, and to the practice of selecting embryos so that the resulting offspring can provide transplant organs to sick siblings.
Born with disability
The Senate vote was closely watched by a member of the House of Representatives, Luc Recordon.
Born with Holt-Oram Syndrome, a rare disease that causes abnormalities of the arms, hands and heart, Recordon gave an emotional speech before the House vote in June.
The Green Party member said at the time that he "would rather not have been born", making a plea for the lifting of the ban.
His comments put him at loggerheads with organisations representing people with disabilities.
Recordon told swissinfo after the Senate vote that "it wouldn't have been good to have a huge majority [in favour], because the risk would have been that we might then move too fast, take things too far and not be aware of the need for limitations".
He added that he was opposed to the liberal legislation found in Britain.
"It is even possible [there] to have children who are chosen because of the colour of their hair. I don't think we should go that far. We must set clear limits."
swissinfo with agencies
The 1997 Convention on Human Rights and Biomedicine stipulates under which conditions pre-implantation genetic diagnosis (PGD) is allowed.
The following countries have specific laws allowing PGD: Denmark, Spain, France and Norway.
It is also permitted in Belgium, Finland, Greece, the Netherlands and Britain.
It is banned in Sweden, Germany, Austria, Ireland and Switzerland.