By Stephen Nakrosis

Energy company BP PLC said Wednesday it completed the sale of its upstream Alaska business to Hilcorp Energy Co.

The company said it continues to work with Hilcorp and regulators to complete the sale of its midstream business.

BP announced the deal in August and also said at the time it was exiting Alaska.

Under the terms of the $5.6 billion deal, Hilcorp is acquiring BP's upstream and midstream businesses in the state, including BP Exploration (Alaska) Inc. and BP Pipelines (Alaska) Inc.'s interest in the Trans Alaska Pipeline System, the company said.

-Write to Stephen Nakrosis at stephen.nakrosis@wsj.com