For the first time, manufacturers of vitamins, herbal pills and other dietary supplements will have to test all of their products' ingredients, the Food and Drug Administration announced Friday.

The agency is phasing in the new rule because existing federal regulations allowed supplements onto the market that were contaminated or didn't contain the dietary ingredients claimed on the label.

Last year, the agency found that some supplements contained undeclared active ingredients used in prescription drugs for erectile dysfunction. In the past, regulators found supplements that didn't contain the levels of Vitamin C or Vitamin A that were claimed.

If, upon inspection, the FDA finds that supplements do not contain the ingredients they claim to contain, the agency would consider the products adulterated or misbranded. In minor cases, the agency could ask the manufacturer to remove the ingredient or revise its label. In more serious cases, it could seize the product, file a lawsuit or even seek criminal charges.

Dietary supplements -- pills, liquids or other products people take to improve their diets -- are a $22 billion industry.

Most companies already test their raw ingredients once they come into the plant, said Steve Mister, president and CEO for the Council for Responsible Nutrition, a trade association representing about 65 manufacturers.

"This raises the bar so that all have to comply," Mister said.

The new rule goes into effect Aug. 24 and will have a three-year phase-in that gives smaller manufacturers more time to comply. The rule applies to all domestic and foreign companies that manufacture, package and label supplements for sale in the U.S. It requires them to test all ingredients that go into their products before they are distributed.

It also includes requirements for record keeping and handling consumer complaints.

The new rule took about 13 years to develop. Under the old regulations, supplements were governed by the same rules that applied to producing foods, such as cans of soup.

"The final rule will help ensure that dietary supplements are manufactured with controls that result in a consistent product free of contamination, with accurate labeling," said Dr. Robert E. Brackett, director of FDA's Center for Food Safety and Applied Nutrition.