Lawmakers in Germany uphold the right of would-be parents to genetically test embyros after IVF.
The Bundestag lower house of parliament voted to allow so-called pre-implantation genetic diagnosis of embryos when one of the partners had a serious hereditary disease in the family.
Each case will also be subject to review by an ethics commission and mandate counselling for the concerned couple before testing can be carried out.
Parliament took up the delicate issue after a federal court last year allowed testing by partners with a genetic predisposition to serious illnesses.
Such testing, which is expected to apply to a few hundred cases each year, had long been outlawed in Germany.
After a three-and-a-half-hour, at times emotional debate, 326 deputies cast their ballots in favour of allowing genetic testing versus 260 who called for a strict ban. Eight abstained.
The head of the German Medical Association, Frank Ulrich Montgomery, stressed that such testing would in no way become routine in cases of in vitro fertilisation, or used for sex selection.
"There will be no designer babies and also no so-called saviour babies used as spare parts for a sick child," he said.
But the chairman of the Episcopal Conference, Roman Catholic Archbishop Robert Zollitsch, slammed the vote as "a violation of the principle of respecting human dignity" enshrined in Germany's Basic Law.
Deputy Wolfgang Zoeller of the conservative Christian Social Union, who voted against the law, said he feared it would set a standard that would lead to discrimination against disabled children.
"Parents should not have to apologise if they do not have a so-called perfect baby," he said.