It is rare when antidiscrimination law is extended to a whole new group of people, but that happened on Saturday, when a federal ban on discriminating on the basis of genetic background took effect. The new law is an important step in protecting people who have inherited a predisposition to disease. It removes a significant obstacle to genetic testing, which can help prevent and treat serious illnesses.

Genetic testing can warn people that they have a disposition for diseases like cancer, and it can help doctors adapt courses of treatment to particular patients.

As advances have been made in genetic testing, however, employers and insurance companies have used it to penalize people. There have been reports of people being denied jobs or being fired because a parent had Huntington’s disease, or the worker had a BRCA1 gene that predisposed her to breast and ovarian cancer. People with family histories of certain diseases have had difficulty in buying health insurance.

A woman whose two children carried a gene for a liver deficiency was denied health insurance in 2003 even though, as carriers of the gene, they would not develop the problem themselves. In a survey, 63 percent of respondents said they would not submit to genetic testing if employers or health insurers could see the results.