Walmart sued Tesla on Tuesday, alleging that solar panels that Tesla installed on seven Walmart stores caught fire.

The lawsuit accuses Tesla of breach of contract, negligence, and failing to live up to industry standards, according to the court filing. Walmart alleges that the fires resulted in evacuations, and damage to property and inventory, according to a CNBC report.

Walmart filed the suit in New York State Supreme Court.

Tesla installed the panels on the roofs of 240 Walmart stores in the U.S. Walmart alleges that Tesla installed defective panels which should have been apparent to any solar expert, used unqualified installers to inspect the installations, didn't ground the panels properly, and left wires hanging and frayed, according to Tesla's own inspection reports. The lawsuit seeks damages, as well as to have Tesla's panels removed.

Solar panels on a Walmart store

Solar panels on a Walmart store

Tesla expanded into the solar panel business by buying Solar City for $2.6 billion in 2016. The move has been criticized in the investment community, which sees it as a bailout for the solar company when Tesla still isn't making steady profits, in part because Solar City was owned by two of Tesla CEO Elon Musk's first cousins.

Walmart signed an agreement with Solar City in 2010 to install the solar panels on 244 of its stores as part of its goal to source 35 percent of its energy from renewable sources by 2020. The solar panels were owned and operated by Tesla (or Solar City), which collected tax credits for the panels and sold the power back to Walmart. The company also used other solar suppliers to install panels on the roofs of at least 327 of its stores in total. The company has also installed electric-car chargers in many stores' parking lots.

Solar panels on a Walmart store

Solar panels on a Walmart store

In the lawsuit, Walmart says seven fires have happened at its stores including Denton, Maryland; Indio, California; and Beavercreek, Ohio; since Tesla has been running the solar operation. Other fires happened before, on Solar City's watch. In May last year, Walmart ordered Tesla to power down the systems, and the lawsuit alleges that one of the fires occurred after the system was turned off.

On Monday, Musk announced that Tesla relaunched its solar business and began offering homeowners the ability to rent panels for as little as $50 a month.

Update: Tesla and Walmart issued a joint statement regarding the lawsuit on Thursday night, saying: 

"“Walmart and Tesla look forward to addressing all issues and re-energizing Tesla solar installations at Walmart stores, once all parties are certain that all concerns have been addressed.

Together, we look forward to pursuing our mutual goal of a sustainable energy future. Above all else, both companies want each and every system to operate reliably, efficiently, and safely.”