SAN MATEO (CNN) — Walmart is suing Bay Area-based 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.

In recent years, Walmart 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 to Tesla for 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.

READ MORE: Update: One Killed, Two Injured When Truck Crashes Into Diners at San Jose Sports Bar

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

READ MORE: COVID: San Francisco Restaurants Prepare For Full Reopening; 'We Will Not Be The Vaccine Police'

Tesla could not be immediately reached for comment. Walmart declined to comment further on the suit.

The suit comes as the electric car maker has been trying to revive its solar business, which has struggled in a fiercely competitive market. In May, the company cut solar panel costs to well below the national average.

Tesla’s stock was down as much as 1.4% in after-hours trading Tuesday evening.

MORE NEWS: 15-Year-Olds Wounded In Windsor Shooting Near Michael Hill Park

© Copyright 2019 CNN. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.