SAN BRUNO — San Bruno officials said Friday they have discovered at least 40 violations of state law in documents that prove an “illegal, cozy, and inappropriate” relationship exists between the state Public Utilities Commission and PG&E, the latest flap in the aftermath of a lethal natural gas explosion in San Bruno four years ago.

The city wrested the documents from the PUC as part of a settlement of a lawsuit the city filed in February against the powerful state agency, which oversees PG&E and other public utilities in California.

“Some of the files clearly document the illegal and inappropriate behavior between the PUC and PG&E that has concerned us for some time,” said Connie Jackson, San Bruno’s city manager. “There is a cozy relationship between PG&E and the PUC that is supposed to regulate it.”

Federal investigators have cited a cozy relationship between PG&E and the PUC and lax oversight as factors that contributed to the natural gas pipeline explosion in September 2010 that killed eight and wrecked a quiet residential neighborhood in San Bruno.

San Francisco-based Pacific Gas & Electric released a statement Friday evening saying it is required to communicate regularly with the PUC on a wide range of issues and that “we’re absolutely committed to conducting ourselves in an ethical manner at all times.” A statement released by the PUC did not characterize its relationship with the PG&E, but said it has an “ongoing commitment to public access and transparency.”

Some of the documents handed over involve emails between PUC President Michael Peevey and Brian Cherry, PG&E’s vice president of regulatory relations.

In one email, in April, Peevey offered advice to Cherry about how the utility should handle its public relations regarding a federal criminal indictment of the utility.

“PG&E’s decision to issue a press release last week anticipating all this only meant that the public got to read two big stories rather than one. I think this was inept,” Peevey wrote.

In another email, Laura Doll, PG&E’s director of regulatory relations, complained to Paul Clanon, executive director of the PUC, about a flurry of requests about the San Bruno situation from the PUC’s legal staff. Clanon is arguably the second-most powerful official at the agency, after Peevey.

“I can’t get over the unchecked appetite for global data requests from the PUC legal staff. It’s unmanageable,” Doll wrote to Clanon in a December 2011 letter. Doll also asked Clanon to intervene in the matter, which at that point was part of an official PUC proceeding regarding the San Bruno explosion. “Is there any procedural opportunity to have other eyes on the scope and nature of these requests? I’m being naive again, right? But thanks for listening.”

In an April 2013 email, Carol Brown, chief of staff for Commissioner Peevey, wrote to PG&E executive Doll and offered advice about how to handle one of the proceedings related to the San Bruno explosion. In the email, Brown said she had talked to one of the PUC administrative law judges about the matter.

“Send back a sweet note” to the PUC about the matter “and then wait for them to throw a fit” was part of Brown’s advice. Brown also said she was “happy to chat” about the matter with PG&E to help guide company officials through the PUC process.

Doll replied to Brown, “Love you. Thanks.”

State Sen. Jerry Hill, whose district includes San Bruno, said Friday that the documents clearly show that “the PUC and Michael Peevey are in PG&E’s pocket.”

“This is shameful,” Hill said.

Contact George Avalos at 408-859-5167. Follow him at Twitter.com/georgeavalos.