Marathon Petroleum plans to acquire Andeavor - a move that would form the nation's largest oil refiner.

Jones Day and Sullivan & Cromwell are advising on a $23.3 billion energy deal that, when completed, will create the nation's largest refiner.

Marathon Petroleum Corp., represented by Jones Day, and San Antonio-based Andeavor, formerly Tesoro Corp., advised by Sullivan & Cromwell, announced on Monday they have reached a definitive merger agreement in which Marathon will acquire all outstanding Andeavor shares for a total of $23.3 billion. Andeavor shareholders can choose to take 1.87 shares of Marathon stock or $152.77 in cash for their Andeavor shares.

The transaction was approved unanimously by the board of directors of each company and is expected to close during the second half of 2018, pending regulatory and other customary closing conditions, including approvals from shareholders of both companies.

The combined company will be headquartered in Findlay, Ohio, where Marathon is based, but will maintain an office in San Antonio. San Antonio has already lost several corporate headquarters, including C.H. Guenther & Son, Rackspace Hosting, and CST Corp., according to the San Antonio Express-News.

Andeavor executive vice president, general counsel and secretary Kim Rucker is working on the deal, along with deputy general counsel Joe Sullivan and managing counsel and assistant secretary Dathan Voelter.

Their outside counsel is a New York-based team from Sullivan & Cromwell led by partners Frank Aquila and Audra Cohen. They are joined by associates Polina Demina, Natalie Lum-Tai, Olivia Xie and Danyang Zhao.

In addition, partner Ronald Creamer and associate Alexander Apostolopoulos, both of New York, are advising on tax matters, and New York partner Heather Coleman, along with associates Sarah Remmer Long and Traci Biedermann, are handling executive compensation and benefits matters. New York partner Catherine Clarkin and associates Jennifer Lee and So Yeon Kim are advising on securities matters. Also, partner Ari Blaut and associates Lee, Lindsey Chandler and Jessica Kim, all in New York, are advising on financing matters, while New York partner Steve Holley, Washington, D.C., partners Renata Hesse and Joe Matelis, London partner Juan Rodriguez, London associate Frederic Robles and Washington, D.C., associate Samantha Hynes are handling antitrust matters.

At Marathon, vice president and general counsel Suzanne Gagle, assistant general counsel Michael Barnett and corporate secretary and chief compliance officer Molly Benson are working on the deal.

They are being advised by a team from Jones Day led by partners James Dougherty of Cleveland and New York, and Lyle Ganske and Ben Stulberg, both of Cleveland.