Oakland, Calif. A judge has ordered Target Corp. to stop improperly disposing of damaged or defective items that qualify as hazardous waste, the Associated Press reported.

Alameda County Superior Court Judge Steven Brick signed the order Friday based on allegations brought by the state of California and several cities and counties.

Their lawsuit contends that Target stores statewide have routinely thrown hazardous items such as bleach, pesticides, paint, aerosols and electronics directly into the trash.

The company could face "millions of dollars" in civil penalties, restitution and investigative costs, said Vincent Sato, Los Angeles special assistant city attorney. The case is headed for trial after negotiations broke down over the summer, Sato said.

Among the claims, the city attorney's office in Los Angeles said stores there sent more than 5,000 lbs. of unsalable hazardous products to a regional food bank.

Target said in a written statement that the company has a comprehensive program in place to ensure its 240 stores across California comply with state law.

"We take any legal challenge to our program seriously, and will continue to devote substantial resources in order to remain a responsible corporate steward of the environment," the company said.

California law requires special handling of hazardous wastes to avoid environmental contamination.