US supermarket chain Walmart is suing Tesla's energy division, after solar panels on seven of its stores caught fire.
It alleges that the firm was negligent in how it installed the panels on the roofs of the stores.
Court documents describe a string of fires that occurred between 2012 and 2018 at Walmart locations in Ohio, Maryland and California.
The lawsuit alleges that the first fire occurred at a Walmart store in Long Beach, California in 2012.
Another in Beavercreek, Ohio, in March 2018 saw customers evacuated and the store closed for eight days.
Walmart is asking Tesla to remove solar panels from all its stores and to pay damages.
It alleged that Tesla deployed individuals to inspect the solar systems who "lacked basic solar training and knowledge".
"To state the obvious, properly designed, installed, inspected and maintained solar systems do not spontaneously combust," the court documents claim.
Tesla and Walmart have partnered on several clean energy initiatives, and more than 240 stores have been fitted with solar panels from the firm.
Walmart has also pre-ordered at least 45 Tesla electric trucks to add to its vehicle fleet.
In 2016, Tesla spent $2.6bn (£2.1bn) on clean energy firm SolarCity, which was founded by Elon Musk's cousins but, since then, installations have dropped by more than 85% and Tesla has cut its sales force and ended a distribution deal with US store Home Depot.
Mr Musk's firm is also facing investigations from the US National Transportation Safety Board regarding fires in several Tesla cars.
Last month, the firm reported a $408m loss in second quarter earnings.
Tesla's share price fell on news of the Walmart lawsuit, which was filed in the New York State Supreme Court on Tuesday.