New York (CNN Business) Walmart is suing Tesla for breach of contract after its solar panels allegedly ignited fires on the roofs of Walmart stores, according to a complaint filed Tuesday in the state of New York.

Walmart WMT Tesla TSLA In recent years,installed solar panels from Tesla Energy Operations on the more than 240 stores across the country. The two companies agreed that Walmart would lease or license its roof space tofor the solar panels in exchange for lower energy costs, and Tesla would retain ownership of the panels and handle their maintenance, the filing states. It details fires at seven stores across the country, which Walmart contends all originated in Tesla solar panels and cost the retailer millions in repairs.

"To state the obvious, properly designed, installed, inspected, and maintained solar systems do not spontaneously combust, and the occurrence of multiple fires involving Tesla's solar systems is but one unmistakable sign of negligence by Tesla," the complaint states.

With the suit, Walmart is seeking to recover the costs related to the fires and have Tesla remove the systems, as well as unspecified other damages.

Tesla did not respond to requests for comment. Walmart declined to comment further on the suit.

Read More