For decades, farmers across America have been encouraged by the federal government to spread municipal sewage on millions of acres of farmland as fertilizer. It was rich in nutrients, and it helped keep the sludge out of landfills.

But a growing body of research shows that this black sludge, made from the sewage that flows from homes and factories, can contain heavy concentrations of chemicals thought to increase the risk of certain types of cancer and to cause birth defects and developmental delays in children.

Known as “forever chemicals” because of their longevity, these toxic contaminants are now being detected, sometimes at high levels, on farmland across the country, including in Texas, Maine, Michigan, New York and Tennessee. In some cases the chemicals are suspected of sickening or killing livestock and are turning up in produce. Farmers are beginning to fear for their own health.

The national scale of farmland contamination by these chemicals — which are used in everything from microwave popcorn bags and firefighting gear to nonstick pans and stain-resistant carpets — is only now starting to become apparent. There are now lawsuits against providers of the fertilizer, as well as against the Environmental Protection Agency, alleging that the agency failed to regulate the chemicals, known as PFAS.

In Michigan, among the first states to investigate the chemicals in sludge fertilizer, officials shut down one farm where tests found particularly high concentrations in the soil and in cattle that grazed on the land. This year, the state prohibited the property from ever again being used for agriculture. Michigan hasn’t conducted widespread testing at other farms, partly out of concern for the economic effects on its agriculture industry.