The U.S. Court of Appeals here, in a decision expected to have a broad impact on federal food-safety regulation, has ruled that the Food and Drug Administration must set official safety levels for environmental contaminants in food products, even if the contaminant is a natural one.

The decision means that the FDA can no longer use informal guidelines, called "action levels," to decide when food contains too much lead, mercury, chemicals such as DDT that are banned but persist in food, or natural poisons such as aflatoxin and shellfish toxin.

"It will radically change the way the FDA handles a broad category of carcinogens -- those that are natural or already in the environment," said William B. Schultz, an attorney for the public-interest organization Public Citizen, which brought the case along with the Community Nutrition Institute.

While neither side in the lawsuit expects the ruling to have an immediate impact on the food supply, the decision eventually could affect thousands of common foods.

Peanut butter, corn products and even milk, for example, can contain minute quantities of aflatoxin, a potent cancer-causing substance produced by a mold that grows on peanuts, corn and other grains. Some fish contain low levels of mercury, which can cause nerve damage in humans, and fresh produce can contain residues of pesticides that have been off the market for years but remain in the soil.

The decision, which reverses a ruling by the U.S. District Court for the District of Columbia, reportedly came as a surprise to FDA officials.

"We are still studying the impact of this," said FDA spokesman Bill Grigg. "In these areas where you have a natural contaminant, tolerances are difficult. If the thrust of the decision would require FDA to do things which we don't think were intended by Congress -- to cause great amounts of food to be wasted without good reason . . . we'd have to consider an appeal."

The appellate court's decision came in a case involving aflatoxin, for which there is no official tolerance level. Instead, the FDA uses an action level of 20 parts per billion as a guideline for human consumption. The FDA sets action levels on an ad hoc basis, not through the formal regulatory process.

The appellate court, however, held that the action level did not comply with federal pure-food law.

"Aflatoxins cause liver damage and exhibit carcinogenic properties in animals; evidence also exists suggesting that their ingestion may cause liver cancer in humans," Judge Kenneth Starr wrote. "It is thus undisputed that aflatoxin is a 'poisonous or deleterious substance' . . . . "

Because aflatoxin is not a natural component of corn, the court said, it must be regulated by a formal tolerance that is based on a scientific assessment of its threat to human health.

Grigg said the FDA considered its 20 parts-per-billion level for aflatoxin to be "quite safe, from the information we have."

According to Schultz, however, the public has no way to gauge whether the FDA's action level is safe or not. Because the figure is set by the agency without public comment or review, he said, "We have no way of knowing how they set it. They just publish a book and say 'Here it is.' "

FDA officials contend that setting tolerances through the formal regulatory process is too complicated and time-consuming. FDA's only formal tolerance -- for polychlorinated biphenyls (PCBs) -- took seven years to complete, Grigg said, and setting a tolerance for aflatoxin might take four years or more.

"The difficulty with a substance like this is there is no commercial sponsor," he said. "With food additives, there is somebody willing to go to the trouble and expense of studying and proving its safety and, meantime, the substance is not in the food."

The decision leaves in limbo the question of how the agency will handle environmental contamination in foods before formal tolerances are set.

Technically, according to Schultz, "they can't allow any peanut butter to go on the market until they have a tolerance." But he and Rod E. Leonard of the Community Nutrition Institute said it was unlikely that public-interest groups would try to push the agency that far.

"If we were to challenge, the peanut industry and the peanut users would go to court to prevent a seizure or any kind of action, just to tie it up in the courts," Leonard said.

The decision may also affect a recent proposal by the Environmental Protection Agency, which is seeking to eliminate formal tolerances for eight canceled pesticides in favor of lower action levels. The EPA said its proposal was an effort to curb the "circle of poison" in which pesticides banned in this country enter on imported foods.

The EPA's action, however, was taken under a different federal law, and in each case it is proposing to set action levels that are more stringent than the formal tolerance levels.