The fire was caused by wires for an emergency beacon's lithium-metal battery being crossed and trapped under the battery cover which probably created a short-circuit, the report from the Air Accidents Investigation Branch (AAIB) said.

This could have enabled a “rapid discharge of the battery”, leading to overheating and the release of smoke, fire and flammable electrolyte.

Investigators found that the trapped wires broke the battery seal, which allowed flames, hot gas and battery decomposition products to escape.

The beacon was installed above the ceiling of the passenger cabin towards the back of the plane.

The AAIB noted that its location made it difficult for firefighters to find the source of the blaze.

At the time of the incident the Boeing 787's information documents did not indicate there was a lithium-metal battery above the ceiling panels.

The report noted: “In the event of an in-flight ELT battery fire, fighting the ELT fire and any subsequent structural fire would be challenging for cabin crew due to the inaccessible location of the ELT in the cabin.”

The investigators made a number of safety recommendations, including that the US-based Federal Aviation Administration (FAA) should assess the design of the beacon and its battery to determine whether it has an acceptable level of circuit protection to mitigate against short-circuits.

The other directions included the FAA reviewing the safety of aircraft equipment powered by lithium-metal batteries to check the level of circuit protection and make sure they comply with precautions for venting toxic gas.

Continuous production difficulties had already plagued the Dreamliner before this fire.

It should have entered passenger service in 2008 but it was not until October 2011 that the first commercial flight was operated by Japanese carrier All Nippon Airways.

Dreamliner jets were grounded worldwide in January 2013 because of problems with lithium-ion batteries that overheated or caught fire. Flights resumed four months later after a revamped battery system was installed in the planes.