Walmart has sued Tesla, saying solar panels supplied by the electric carmaker were responsible for fires at about seven of its stores.

The fires destroyed significant amounts of store merchandise and required substantial repairs, totaling hundreds of thousands of dollars in out-of-pocket losses, according to a lawsuit filed in a New York court on Tuesday.

As of November 2018, no fewer than seven Walmart stores, including those in Denton, Maryland, and Beavercreek, Ohio, had experienced fires due to Tesla’s solar systems, according to the lawsuit.

“This is a breach of contract action arising from years of gross negligence and failure to live up to industry standards by Tesla with respect to solar panels that Tesla designed, installed and promised to operate and maintain safely on the roofs of hundreds of Walmart stores,” Walmart said in the court filing.

The world’s largest retailer started using solar panels made by SolarCity, owned by Tesla, in 2010 and the roofs of around 240 of its stores were fitted with solar panels made by the company.

Tesla paid $2.6bn in 2016 to buy SolarCity, a sales and installation company founded by two cousins of the Tesla CEO, Elon Musk.

Tesla is also facing a federal field investigation by the US National Transportation Safety Board after several Model X and Model S owners across the globe said their cars burst into flames, a major disruptor for the company as it tries to ramp up deliveries of its cars.

Last month Tesla reported a $408m loss in its second quarter earnings, despite selling more cars than ever. The company has struggled to prove profitable and suffered a series of high-profile departures, including most recently its chief technology officer.

Tesla did not immediately respond to Reuters’ request for comment.