“BERLIN — Embryos created during in vitro fertilization can be screened for genetic defects before being implanted in the womb, a German high court said in a landmark ruling Tuesday.

The Federal Supreme Court in Leipzig ruled in support of a Berlin gynecologist who had carried out screening on embryos for three different couples and implanted only those that were healthy. The embryos with hereditary genetic defects were left to die off.

The high court’s ruling upheld a decision by a Berlin state court that the doctor’s action did not violate German laws for the protection of embryos.

The 47-year-old doctor, who was not identified by the court, brought the case to court himself in 2006 to clarify the legal situation. He was first acquitted by a regional court in Berlin, but the city’s state prosecutor appealed.

“The accused, a gynecologist who focuses on fertility treatment, has been acquitted of the allegation of threefold violation of the embryo protection law,” the court said in its verdict, ruling that in vitro fertilization, without any restrictions, is allowed.

The doctor had treated three couples between 2005 and 2006 who could not get pregnant naturally. In all three cases, one of the partners carried the risk of a congenital genetic illness that would have “very likely led to a miscarriage, the death of the newborn right after the delivery or the birth of a critically ill child,” the court wrote.

Judge Clemens Basdorf told German news agency DAPD that the examination of IVF embryos should be legal “if there is a danger of grave genetic defects for the desired children of the patients.”