Two major safety incidents linked to possible faulty batteries have forced two leading Japanese airlines to ground their fleets of the Boeing 787 Dreamliners as aviation regulators temporary halted all operations of the passenger jets.

All Nippon Airways grounded all 17 of its Boeing 787s after a domestic flight was forced to make an emergency landing on Wednesday after instruments indicated a battery error and a burning smell in the cockpit was reported.

The battery on the ANA Boeing 787 was the same lithium-ion type that had caught fire on a Japan Airlines plane on the ground in the US, forcing JAL to cancel 787 flights scheduled for Jan 16 and 17, according to Reuters.

Both ANA and Japan Airlines Co. is operating half of the 50 Dreamliners delivered to date. Tokyo said it would not take any chances until investigations assure that the batteries are safe.

The batteries are made by Japan’s GS Yuasa then supplied to France’s Thales group which assembles a system with other electronics for shipping to Boeing, AFP reports.

The Federal Aviation Administration ordered an indefinite suspension of all 787 operations until the risk of possible battery fires is fixed, saying it will work with Boeing to “resume operations as quickly as possible” for the 787s, the US manufacturer’s newest and most technologically advanced plane.

Boeing’s shares fell 3.3% following the incidents as 39 out of the 50 Dreamliners in operation around the world have been grounded.

Jim Mcnerney, Boeing chief executive, said the company “deeply regrets” the incidents’ impacts on airlines and passengers, and vowed to take “every necessary step” to resolve the problems. “We are confident the 787 is safe and we stand behind its overall integrity,” he said.