Tesla Solar
Solar panels set up by Tesla are seen at the San Juan Children's Hospital, after the island was hit by Hurricane Maria in September, in San Juan, Puerto Rico, Oct. 26, 2017. REUTERS/Alvin Baez

Walmart Inc. and Tesla Inc. have settled a lawsuit involving Tesla’s solar roofing unit and fires at several Walmart stores.

Walmart filed suit against Tesla in August in New York State Supreme Court, alleging Tesla SolarCity solar panels had sparked fires on the roofs of at least seven stores of the 244 stores at which they were installed. The suit accused Tesla of gross negligence and came as Tesla announced plans to revive its solar unit. Walmart asked Tesla to remove the solar panels from all 244 stores and to pay for damages.

Terms of the settlement were not released.

“Walmart and Tesla are pleased to have resolved the issues raised by Walmart concerning the Tesla solar installations at Walmart stores,” the companies said in a joint statement. “Safety is a top priority for each company and with the concerns being addressed, we both look forward to a safe re-energization of our sustainable energy systems.”

The companies began settlement talks soon after the lawsuit was filed. In a separate legal dispute, CEO Elon Musk said a Walmart settlement would involve third-party inspections for which Tesla would pay.

Tesla’s solar revival plan involves a new rental program for solar panels. In the second quarter, Tesla installed just 29 megawatts with market leaders SunRun, which installed 103 megawatts, and Vivint, which installed 56 megawatts.

Tesla has been focusing on developing its solar roof although it still offers residential panels and operates a commercial business targeting municipalities, schools, affordable housing, enterprise and agriculture, and water districts.

Tesla still faces a shareholders’ lawsuit over its acquisition of SolarCity for $2.6 billion in 2016. Musk admitted in a deposition that the company’s electric car business took precedence over the solar business and that he had moved solar employees to the electric car business in the ramp up of Model 3 production.

The shareholders allege the SolarCity acquisition was just a bailout of Musk and his relatives as SolarCity was facing a liquidity crisis.