Walmart sued Tesla for "gross negligence" on Tuesday, claiming that the electric car company's energy division installed solar panels that went up in flames on its store rooftops. The fires caused millions of dollars in damage, the lawsuit alleges.

The retailer said fires broke out at seven store rooftops between 2012 and 2018. One location in Ohio had to be closed for eight days, Walmart said in the complaint. The lawsuit claims Tesla never provided Walmart with an explanation for the "root cause" of the fires.

"The number of defects, however, is overwhelming and plainly indicative of systemic, widespread failures by Tesla to meet the standard of care, as set forth in the governing contracts, as to the solar systems installed at Walmart's stores," the lawsuit claims.

Get Breaking News Delivered to Your Inbox

The lawsuit includes photographs of Walmart stores' damaged rooftops, as well as citations from local news coverage of the fires. Photos of a store in Indio, California, for instance, showed a charred roof, which the lawsuit claimed required more than $3 million in repairs and $6 million in damaged merchandise.

Walmart lawsuit photos reveal scorched roofs and massive damage as it claims Tesla solar panels caught fire at 7 storeshttps://t.co/W1U32nEjSh... pic.twitter.com/qyFb6VkAt9 — plugilo (@plugilo) August 20, 2019

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, which is based in Palo Alto, California, did not immediately respond to a request for comment on Tuesday.

SolarCity deal

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.

"Wires on the store's rooftop were still sparking at the time that Walmart discovered the fire and could have ignited more extensive flames, with potentially devastating consequences," the lawsuit claims. "Equally troubling, after Tesla technicians visited the rooftop, one of the technicians failed to close the cover to a combiner box, exposing this important piece of equipment to the elements and thereby creating a fire hazard.

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 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.