WASHINGTON — Federal regulators let Boeing help 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 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 chairman Deborah Hersman said at the opening of a two-day board hearing.

“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.

Testing

The 787, Boeing’s newest and most technologically advanced plane, is assembled at Boeing plants in North Charleston and Everett, Wash. It the first airliner to make extensive use of lithium-ion batteries. Since the FAA doesn’t have safety regulations for those batteries as installed equipment in planes, the agency and Boeing jointly developed the special safety conditions the plane’s battery system should have to meet, according to documents and testimony.

The FAA also agreed to Boeing’s proposed tests for the batteries, and the company and its subcontractors were responsible for performing those tests.

In one key test, a nail was driven into one of the battery’s eight cells to create a short circuit. Based on the test results, Boeing concluded that a short circuit in one cell wouldn’t start a fire or cause the battery’s other cells to short. Yet that’s exactly what NTSB investigators say happened in the battery fire in Boston, although they still don’t know the origin of the short-circuiting.

The test was “state of the art at the time,” Mike Sinnett, Boeing’s chief engineer for the 787, testified at the hearing. “In retrospect, we don’t think it was conservative enough.”

In March 2008, a year after the FAA gave final safety certification to the 787’s battery system, a government-industry advisory committee recommended a more rigorous set of safety tests for the use of lithium batteries generally in planes. FAA officials, however, didn’t change the tests required for the 787.

“We apply the regulatory standards as they appear in the special conditions,” said Steve Boyd, manager of the FAA’s airplane and flight crew interface branch. Boeing’s tests were “reasonable,” he said.

FAA officials also said the risks of using lithium batteries were well known at the time the agency was working on Boeing’s certification request. Lithium batteries are more susceptible to uncontrolled temperature increases and to catching fire when they short-circuit.

Eight months after the FAA approved Boeing’s battery proposal, a fire erupted at a test facility in Arizona when a subcontractor overcharged the battery with the battery protection circuitry disabled, documents show.