PG&E has struck a deal to sell its San Francisco headquarters complex in an $800 million deal, the utility said Monday, a key milepost in its move to relocate its head offices to downtown Oakland.

Hines Atlas US, an affiliate of a real estate development and investment firm, is the buyer of the property.

The utility had previously leased an office tower in downtown Oakland that’s perched on the shores of Lake Merritt for its future headquarters.

“PG&E remains on track for a phased move into its new headquarters at 300 Lakeside Drive in Oakland, beginning in the first half of 2022,” the utility said in a prepared release.

The transaction marks another high-profile corporate exodus from San Francisco.

PG&E is seeking approval for the property sale in San Francisco from the state Public Utilities Commission.

CBRE, a commercial real estate firm, advised PG&E in its efforts to sell its headquarters complex in San Francisco.

The PG&E office complex in San Francisco consists of 77 Beale St., 215 Market St., 245 Market St., and 45 Beale St., U.S. Bankruptcy Court records show.

“We are working hard every day to make fundamental changes at PG&E and become the utility our customers expect and deserve,” Patti Poppe, PG&E’s chief executive officer, said in a prepared release.

The company intends to return to its ratepayers any profits harvested from the sale of the headquarters complex, PG&E said.

Downtown Oakland’s 300 Lakeside office and retail complex that includes a 28-story office tower. //

In downtown Oakland, PG&E also has reached a deal to purchase the 300 Lakeside office tower as a way to create a long-term presence in the East Bay’s largest city.

“We’re so excited to deepen our ties to the wonderful Oakland community,” Poppe said. “As an economic and innovation hub for California, Oakland is the perfect place for PG&E to call our hometown.”