The battery of a Tesla that ignited after a 116 mph crash in Florida contributed to the death of two teenagers who were killed in the accident, officials said Thursday.

In an accident report, the National Transportation Safety Board concluded the 18-year-old driver lost control of Tesla in the May 2018 crash in Fort Lauderdale because he was driving at such a high rate of speed.

But the report notes that, “contributing to the severity of the injuries was the postcrash fire originating in the crash-damaged lithium-ion traction battery.”

The teen, identified by the Miami Herald as Barrett Riley, was killed in the crash on Seabreeze Boulevard along with front-seat passenger Edgar Monserratt Martinez. Both teens were days away from graduating high school.

The NTSB report notes Riley’s father took the car to Tesla dealership and had it placed in “loaner” mode after his son was caught driving at 112 mph in a 50 mph speed zone two months before the fatal crash.

The loaner mode made it impossible for the car to exceed a speed of 85 mph, according to the report.

But the teen later brought it back to the dealership, and workers there restored the car to its normal settings.

The teen’s parents have sued Tesla, claiming they’re responsible for his death because they removed the “loaner” setting and because of the fire caused by the car’s battery.

“When they arrived on scene, units from the FLFR found the car fully engulfed in flames and the rear passenger sitting on the sidewalk,” the NTSB report says.

“Firefighters reported that the heat from the fire was intense and that they could see electrical arcing,” it adds.

Tesla did not immediately return a request for comment.