Michael Peevey, the head of the California Public Utilities Commission, has done the right thing and announced that he will step aside at the end of the year.

Peevey has been under fire for the past several years, ever since the deadly 2010 San Bruno pipeline explosion brought to light the commission’s lax regulation of Pacific Gas and Electric Co. The more recent disclosures of the commission’s cozy dealings with PG&E executives just pointed out how thoroughly enmeshed these two organizations were — to the detriment of the public’s safety, PG&E’s customers and the whole state.

Peevey’s announcement, while welcome, still leaves the commission in a mess. The relationship between the commission and PG&E is under investigation by both a team of federal prosecutors and state Attorney General Kamala Harris. The next commission president has to preside over a massive culture change at the organization, and also convince the public to reinvest its trust in the commission’s regulatory effectiveness.

This is an opportunity for Gov. Jerry Brown, who remained regrettably passive while the commission was imploding, to step up. Brown will choose Peevey’s successor, and we urge him to start reaching out to consumer advocate groups now.

One of the reasons why Peevey was chosen in 2002 was that he was considered an insider, a man who the utilities trusted. That may have been an asset 12 years ago, when the state was still recovering from an energy crisis. But the last several years have made it clear that the next president needs to bring a more independent mentality to the table.

Much remains to be done in the wake of the 2010 San Bruno disaster, including an ongoing tussle over the fine amount that PG&E has to pay. Handling these matters — and ensuring that the next San Bruno never comes to pass — is going to require a president who’s willing to put his thumb on the scale of public safety. A president who’s actively supportive of the tough steps that California needs to move toward a low-carbon future isn’t likely to endear himself to the utilities, either.

It’s a long and tricky laundry list for the next commission president. But without question, it’s past time for Peevey to go.