WEDNESDAY, Mar. 11, 2015 (HealthDay News) — The maker of liquid Tylenol and Motrin for children and infants has agreed to plead guilty Tuesday to selling the over-the-counter medications even though the bottles were contaminated with metal particles.

McNeil Consumer Healthcare will pay $25 million as part of its plea agreement, the Associated Press reported. The Fort Washington, Pa.-based company, a unit of Johnson & Johnson, was facing a federal criminal charge for knowing for nearly a year that metal particles, including nickel, iron and chromium, were getting inside the bottles of medicine during the manufacturing process.

Although no immediate steps were taken to fix the problem, the Fort Washington plant where the contaminations occurred was shut down in 2010 and a new, yet-to-open plant has been built in its stead, the AP reported.

McNeil was first alerted to the problem in 2009 following a customer complaint, but the company kept selling the medications for several months before issuing a recall, according to the AP. At the time, the U.S. Food and Drug Administration said the chances for serious medical problems were unlikely, but it advised consumers to stop taking the medications, the wire service reported.

The health care company is currently in an agreement with the FDA that includes increased inspections and oversights at it manufacturing plants, according to the AP.