SAN FRANCISCO — Pacific Gas and Electric was charged Tuesday with 12 federal felony counts involving safety violations linked to a 2010 natural gas pipeline explosion that killed eight people in the San Francisco Bay Area.

Federal prosecutors allege that the company knowingly relied on erroneous and incomplete information when assessing the safety of the pipeline that eventually ruptured, set off a fireball and leveled 38 homes in San Bruno.

Prosecutors also accused the company of failing to act on threats in its pipeline system even after the problems were identified by its own inspectors.

About a year after the explosion, investigators with the National Transportation Safety Board found that these lapses by Pacific Gas and Electric led to the blast.