NEW YORK -- Walmart sued Tesla for "gross negligence" on Tuesday, saying that the electric car company's energy division installed solar panels that went up in flames on its store rooftops.

The retailer said fires broke out at seven store rooftops between 2012 and 2018, causing millions of dollars in damage. One location in Ohio had to be closed for eight days, Walmart said in the complaint.

Inspections found that several of Tesla's solar panels were broken and that wires were hanging out, causing a fire hazard. In its lawsuit, Walmart said Tesla engaged in "widespread, systemic negligence" and "failed to abide by prudent industry practices in installing, operating, and maintaining its solar systems."

Tesla Inc., which is based in Palo Alto, California, did not immediately respond to a request for comment on Tuesday.

Walmart said it had deals with Tesla Energy, formerly known as SolarCity, to install and maintain solar panels on 244 Walmart stores.

In May of last year, Walmart said it demanded that Tesla disconnect all the solar panel systems it had installed. But Walmart said another fire still occurred at a California store, even though the panels had been disconnected for several months. The company said that the wires on the store's rooftop were still sparking when it discovered the fire.

Walmart said it later found out that Tesla ignored an alert from that store's solar panels, which Walmart said was the likely cause of the fire. In the court documents, Walmart said ignoring the alert reveals "Tesla's utter incompetence or callousness, or both."

Bentonville, Arkansas-based Walmart Inc. did not specify how much money it is seeking from Tesla in the lawsuit filed in New York State Supreme Court, saying that the amount would be determined at trial.