PBF Energy Inc. (PBF) agreed to buy ExxonMobil Corp.'s (XOM) refinery in Torrance, Calif., for $537.5 million, completing Executive Chairman Tom O'Malley's vision to have PBF plants coast to coast.

The transaction follows PBF's purchase earlier this year of the Chalmette, La., refinery which Exxon owned jointly with Petroleos de Venezuela SA. With the deal, PBF lags behind only Phillips 66 (PSX) in its regional diversity. Phillips has refineries in all five major fuel markets, while PBF will have four.

The Torrance refinery, which has remained at reduced output rates since a fire in February, will return to full production before the deal closes, according to a statement from PBF.

With this latest purchase in California, PBF has a greater opportunity to compete with Valero Energy Corp. (VLO), Phillips 66 and other refiners with a broad national presence, said John Auers, executive vice president of Turner, Mason & Co. in Dallas.

The purchase gives PBF greater geographic diversity, expanding beyond its plants in New Jersey, Delaware, Ohio and Louisiana.

"Southern California is a very attractive market and we are excited to become a supplier in the region," said Tom O'Malley, who previously served as CEO of refiners Premcor and Tosco. Tosco operated in California.

The plant secures PBF's first toe-hold in the often-lucrative California market. Because the California market is isolated from other refined products supplies, the state's refineries produce most of the gasoline used there. As a result, a disruption at any plant in California can cause prices to spike.

"In routine times, margins are decent but not great, but let's say another plant has a problem, it will be good for them," said Auers.

PBF, based in Parsippany, N.J., has expanded its capacity by about 60 percent this year and will be able to process 900,000 barrels per day (bbl/d) of crude after it closes on the 155,000 bbl/d Torrance plant in the second quarter of 2016, the company said in a statement.

The Torrance refinery has access to discounted California crude that trades about $8 a barrel below Alaskan North Slope crude. As a result of units like a coker, the plant rates a 14.9 on the industry's Nelson Complexity scale, indicating that it can convert sludgy crude to valuable products like gasoline.

The acquisition also includes storage facilities and pipelines, which PBF will potentially be able to drop down into its MLP for midstream assets.