Canada’s Verenex Energy has announced that the Libyan Investment Authority (LIA) will acquire all of its shares, following approval from a Canadian court.

The deal still needs to be approved under the Investment Canada Act.

Verenex’s management team had originally entered into an agreement to sell the business to China National Petroleum Corporation. However that deal, which was signed in February, was abandoned in early September after Libya’s National Oil Corporation failed to give consent for the sale.

Verenex is an international oil and gas exploration, and production company with fields in the Ghadames Basin in Libya. Under the terms of its licensing deal in the country, Tripoli was able to exercise the right to buy the company ahead of any other bidders.

Libya established the LIA in 2006 as a sovereign wealth fund to manage the country’s surplus oil revenues.