SAN FRANCISCO — California Attorney General Jerry Brown on Monday sued 20 companies, including Mattel Inc. and Toys "R" Us, claiming they sold toys containing "unlawful quantities of lead."

The lawsuit, filed in Alameda County Superior Court, charges the companies knowingly exposed children to lead and failed to provide warning of the risk, which is required under the Safe Drinking Water and Toxic Enforcement Act of 1986, known as Proposition 65.

If the lawsuit is successful, the companies could pay a $2,500 fine for each violation, according to the complaint.

Spokeswomen for El-Segundo-based Mattel and New Jersey-based Toys "R" Us said the companies were expecting the lawsuit and already had implemented a system of checks to ensure their quality and safety standards weren't violated again.

The legal action follows major recalls of toys, lunch boxes, children's jewelry and other goods during the last year by the U.S. Consumer Product Safety Commission in Washington.

In June, toymaker RC2 Corp., one of the defendants in the lawsuit, recalled 1.5 million of its Thomas & Friends Wooden Railway sets. Mattel followed in August with a series of recalls of more than 2 million toy cars, trains, shape-sorters and Barbie doll accessories. Its Fisher-Price unit also pulled Sesame Street-themed products from a line of infant and preschool toys.

The Center for Environmental Health, an Oakland-based nonprofit agency that seeks to remove harmful chemicals from daily life, applauded the lawsuit.

The center "has tested hundreds of toys and has revealed many with extremely high lead levels," said executive director Michael Green. "Attorney General Brown's decision to take on the toy companies is an important step toward cleaning up this industry."

The lawsuit, which was joined by the Los Angeles city attorney's office, also named as defendants Wal-Mart, Target, Sears, KB Toys, Costco Wholesale and others.