Imperial Oil Ltd, majority owned by Exxon Mobil Corp, reported a sharp rise in fourth-quarter profit, helped by a gain from the sale of its service stations.

Canada’s No.2 integrated oil producer and refiner sold its remaining company-owned Esso retail stations to five fuel distributors for about $2.8 billion (US$2.15 billion), resulting in a $988 million gain in the quarter.

The company’s oil and gas business posted net income of $103 million, compared with a loss of $289 million a year earlier, helped by a recovery in oil prices.

Imperial’s production dipped to an average of 399,000 gross oil-equivalent barrels per day from 400,000 a year earlier.

The company has kept a tight leash on costs since oil prices began to slide in mid-2014.

Imperial said on Tuesday its exploration and production costs had fallen 10 percent per unit from 2015.

Net income at Imperial’s downstream business jumped to $1.36 billion from $352 million due to the sale of the service stations.

The company’s total net income rose to $1.44 billion, or $1.70 per share, in the quarter, from $102 million, or 12 Canadian cents per share, a year earlier.

The Calgary-based company’s revenue rose 35.5 percent to $8.44 billion. (US$1 = 1.3051 Canadian dollars)