WASHINGTON -- Federal regulators let Boeing write the safety conditions for the problematic battery system in its beleaguered 787 "Dreamliner," prescribe how to test it and carry out those tests itself, according to testimony and documents released at a hearing Tuesday.

As airlines prepare to resume flying the 787 after a three-month grounding, the National Transportation Safety Board is looking at how the Federal Aviation Administration, Boeing and the company's subcontractors tested and approved the 787's lithium ion batteries, and whether the government grants aircraft makers too much leeway when it comes to safety.

Batteries aboard two 787s failed less than two weeks apart in January, causing a fire aboard one plane and smoke in another. The root cause of those two incidents is still unknown.

"We are here to understand why the 787 experienced unexpected battery failures following a design program led by one of the world's leading manufacturers and a certification process that is well respected throughout the international aviation community," NTSB's Chairman Deborah Hersman said at the opening of a two-day board hearing. Officials with the FAA, Boeing and Boeing subcontractors responsible for the battery system were scheduled to testify.

"We are looking for lessons learned, not just for the design and certification of the failed battery, but also for knowledge that can be applied to emerging technologies going forward," Hersman said.

The 787, Boeing's newest and most technologically advanced plane, is the first airliner to make extensive use of lithium-ion batteries. Since the FAA doesn't have safety regulations for the use of lithium batteries as installed equipment in planes, Boeing proposed special safety conditions the plane should have to meet. Those were effectively the same requirements FAA ultimately set for the battery system in 2007, according to documents released at the hearing.

To save manpower, the FAA designates employees of aircraft makers to oversee the safety testing of new planes. Every item that is part of an airplane, down to its nuts and bolts, must be certified as safe before the FAA approves that type of plane as safe for flight. Boeing received FAA safety certification for the 787 in August 2011.

"In a way, the designee system is admitting the FAA doesn't have the manpower to do what is required, and also that they may not have the expertise," said John Goglia, a former NTSB board member and aviation safety expert.

The FAA has used designated company employees to oversee and validate some safety testing for more than two decades, a practice critics complain poses conflicts of interest. The agency significantly expanded its use of designees in recent years under pressure from manufacturers, who complained it was taking the agency too long to approve new planes because they didn't have enough staff.

If industry had to wait for government employees to develop enough technical knowledge to assess new aviation technologies, "we would just never get any products certified," Goglia said.

It has long been known that lithium batteries are more susceptible than conventional nickel-cadmium batteries to extreme, uncontrolled temperature increases and fires that are very difficult to extinguish. But lithium batteries weigh less, store more energy and recharge faster than conventional batteries, making them attractive to aircraft makers and their airline customers.

Boeing did some of the safety testing on the 787 battery system, but much of the testing was done by a subcontractor, Thales of France, which made the 787's electrical system, and by battery maker GS Yuasa of Japan, according to a previously released NTSB report. The testing concluded there was no chance that short-circuiting would lead to a fire, and the odds of a smoking battery were one in every 10 million flight hours.

Instead, there were two battery failures when the entire 787 fleet had clocked less than 52,000 flight hours. The first came Jan. 7 aboard a Japan Airlines 787 parked at Boston's Logan International Airport shortly after landing from an overseas flight. Firefighters reported two small flames and dense clouds of white smoke streaming from the battery. It was more than an hour before they declared the incident under control.

Nine days later, a smoking battery aboard an All Nippon Airways 787 led to an emergency landing in Japan. The Federal Aviation Administration ordered all U.S.-registered 787s grounded the same day, and aviation authorities in other countries swiftly followed suit.

The NTSB, which is investigating the Boston incident, hasn't yet determined the fire's cause and may never be able to do so. The insides of the battery were severely charred, leaving few clues for investigators.

Boeing has since developed and tested a revamped version of the battery system, with changes designed to prevent a fire or to contain one should it occur. FAA officials approved the revamped batteries last week and agreed to lift the grounding order. The company has been working furiously to install the new system on the 50 Dreamliners in service worldwide. Boeing has orders for 840 of the planes from airlines around the globe.

What the NTSB uncovers regarding the FAA's safety certification program could have important implications for the agency's ability to handle other technology challenges, including the transition to a new air traffic control system and the introduction of unmanned aircraft into the national airspace, said Jim Hall, a former safety board chairman.

"It's important to know that the government has oversight capability," Hall said. "Our aviation safety, which is unparalleled at the moment in the world, has been built on having active oversight by the FAA."