Pre-implantation genetic diagnosis (PGD) – in which a cell or two are extracted from a developing embryo to test for genetic disorders – has divided governments around the world, with many people opposing it on religious and ethical grounds, or arguing that it would let parents choose a "designer baby".
The new law will allow screening embryos of parents who have a predisposition to severe genetic disorders, where a pregnancy would be likely to result in either stillbirth or miscarriage.
Existing German law did not fully regulate PGD and the German high court ruled that parliament should take up the issue with respect to serious genetic defects.
Shortly before the free vote there was no clear majority among the more than 600 German MPs for three rival bills on genetic testing of human embryos.
They ranged from calling for a strict ban to limited legalisation and a compromise between the two.
One parliamentarian, Steffen Bockhahn from the Left party, became highly emotional during the debate, telling how the screening enabled him and his wife to have a child.
Labour Minister Ursula von der Leyen, from Chancellor Angela Merkel's conservative party, said before the vote that concern over the issue of "designer babies" was unfounded.
"So-called 'designer babies', which would be musically gifted or athletic or have blue eyes, are a fantasy," said von der Leyen, a physician and mother of seven. "It's about severe illness of individual cases."
One proposal supported by Merkel had called for a strict ban on PGD, arguing it would lead to scenarios in which parents could choose a child's characteristics.
Kerstin Janich, a woman from near Munich whose four-year-old son Louis died of a genetic disease, said in a recent interview that there was little public understanding of why some parents who struggle to have children go through screening.
"It's not about allowing a 'designer baby' with blond hair and blue eyes or a sick child not deserving to live," she said. "It's about the suffering of an entire family, for siblings and relatives and friends."
Under the new law, parents will have to undergo counselling, and an ethics panel must approve the procedure to select a developing embryo that tests negative for certain anomalies before it is implanted in the womb.
Proponents of a ban said PGD would negatively influence the acceptance of diversity within society.
Wolfgang Thierse from the opposition Social Democrats said screening could prevent suffering in individual cases, but "in each case it would violate a person's right to life".
Paul Devroey, the head of reproductive medicine at the Free University of Brussels clinic, said in an interview that a strict ban on PGD would cause people to travel to neighbouring countries where it is legal to have the screening performed.
(Reuters Health, Thorsten Severin and Eric Kelsey, July 2011)