PG&E announced Monday that it has agreed to sale terms for its San Francisco headquarters, opting to move to the edge of Lake Merritt in Oakland.

PG&E agreed to sell its headquarters complex, including 77 Beale St. and 245 Market St., for $800 million to Delaware-based Hines Atlas US LP. The utility has been headquartered in San Francisco for more than a century.

The deal must still be approved by the California Public Utilities Commission. It would net PG&E roughly $400 million, according to the utility, which has proposed to the CPUC to return the profit to customers by offsetting future utility rates over a five-year period.

“This sale and relocation will achieve cost savings that directly help reduce customer bills,” PG&E Corp. CEO Patti Poppe said in a statement. “At the same time, it will give us an efficient and effective Bay Area workspace as we focus on delivering for all of the communities we serve.”

PG&E is expected to move into its new headquarters in the 28-story Kaiser Center at 300 Lakeside Drive in Oakland, with an expectation that the move will lower the utility’s costs in the long term.

The utility also plans to eliminate its satellite offices in Concord and San Ramon and consolidate them into the new Oakland office to streamline its footprint in the Bay Area.

PG&E has proceeded through Chapter 11 bankruptcy over the last two years after victims of fires started in the North Bay and Butte County by PG&E’s equipment filed billions of dollars’ worth of claims.

PG&E ultimately promised to pay $13.5 billion to a victim compensation trust.

“We are working hard every day to make fundamental changes at PG&E and become the utility our customers expect and deserve,” Poppe said.

The move to the new Oakland headquarters is expected to begin in the first half of next year, according to PG&E.