In the past few years, a handful of Walmart stores have seen their rooftops catch fire. The retail giant believes Tesla's solar panels are to blame.

Walmart filed a lawsuit in New York on Tuesday, saying Tesla breached its contract due to "years of gross negligence." Now it wants Tesla to remove its solar panels from more than 240 stores and pay for the damages.

According to the lawsuit, the panels caught fire as early as 2012. But between March and May 2018, fires at three separates stores caused significant damage. All three stores used the solar panels. In total, Walmart blamed Telsa for no fewer than seven fires.

The company also took issue with Tesla's panels, even the ones that didn't catch fire. The complaint says there were visible cracks and loose wires related to the Tesla systems. Walmart also argues Tesla inspectors "lacked basic solar training and knowledge" and may have not been inspecting the panels properly.

Walmart has invested in solar energy for years. It had a deal with a company called SolarCity, which completed more than 200 projects at Walmart stores since 2010. Tesla bought SolarCity in 2016.

A Walmart spokesperson told Newsy the company had no further comment on the lawsuit. Tesla did not immediately respond to a request for comment.