The settlement, announced by attorneys general for 42 states and the District of Columbia, resolves claims related to several products, including children's medicines, that were voluntarily recalled from 2009 to 2011.

The list includes St. Joseph Aspirin, Sudafed, Pepcid, Mylanta, Rolaids, Zyrtec, and Zyrtec Eye Drops, the Illinois attorney general said in a news release.

The company's Johnson & Johnson Consumer Inc unit must also ensure that its marketing and promotional practices do not unlawfully promote over-the-counter drug products, the attorneys general said.

The accord followed a string of recalls of millions of packages of drugs made by J&J's McNeil-PPC Inc unit, now part of Johnson & Johnson Consumer, over faulty manufacturing.

According to the state attorneys general, McNeil put on the market batches of drugs that failed to comply with federal standards and were deemed adulterated as a matter of federal law.

They claimed that McNeil misrepresented its compliance federal manufacturing rules and the quality of its over-the-counter drugs.

"Johnson & Johnson's disregard for proper manufacturing practices of children's medications was unacceptable," Illinois Attorney General Lisa Madigan said in a statement.

In a statement, J&J said that its "recalls were precautionary and not undertaken on the basis of any health or safety risks to consumers, and we remain committed to providing consumers with safe and effective over-the-counter medicines."

J&J's McNeil unit previously in 2015 pleaded guilty to selling liquid medicine contaminated with metal and agreed to pay $25 million to resolve a U.S. Justice Department investigation.

(Reporting by Nate Raymond in Boston; Editing by Chizu Nomiyama and David Gregorio)

By Nate Raymond