Equinor ASA, an enthusiastic buyer in the early days of the Lower 48 unconventional oil and gas revolution, has put the portfolio in reverse, with the Bakken Shale the latest to change hands.

The Norwegian major said Wednesday it agreed to sell its North Dakota and Montana assets to EnCap Investments-backed Grayson Mill Energy for around $900 million. The transaction covers all the operated and nonoperated leasehold, about 242,000 net acres, along with the associated midstream assets.

“Equinor is optimizing its oil and gas portfolio to strengthen profitability and make it more robust for the future,” CEO Anders Opedal said. “By divesting our Bakken position, we are realizing proceeds that can be deployed toward more competitive assets in our portfolio, enabling us to...