U.S. oil major Chevron has doubled its third quarter earnings on the back of higher crude oil prices.

Chevron on Friday reported earnings of $4 billion for third quarter 2018, compared with $2 billion in the third quarter of 2017.

Included in the current quarter were a write-off, an asset impairment, and a non-recurring contractual settlement totaling $930 million in the upstream segment, and a gain of $350 million on the sale of southern Africa refining, marketing and lubricant assets, Chevron said on Friday.

Foreign currency effects decreased earnings in the 2018 third quarter by $51 million, compared with a decrease of $112 million a year earlier.

Chevron’s sales and other operating revenues in third quarter 2018 were $42 billion, compared to $34 billion in the year-ago period.

Chevron Chairman and CEO, Michael Wirth, said: “Our strong financial results reflect higher production and crude oil prices coupled with a continued focus on efficiency and productivity.”

Wirth also said: “Net oil-equivalent production of 2.96 million barrels per day represents our highest quarter ever. Ramp-up of Wheatstone in Australia and the Permian Basin in Texas and New Mexico drove a production increase of 9 percent over the prior year quarter.”

U.S. upstream operations earned $828 million in third quarter 2018, compared with a loss of $26 million a year earlier. The improvement reflected higher crude oil realizations and production, partially offset by higher depreciation and exploration expenses, primarily reflecting a $550 million write-off of the Tigris Project in the Gulf of Mexico.

The company’s average sales price per barrel of crude oil and natural gas liquids was $62 in third quarter 2018, up from $42 a year earlier. The average sales price of natural gas was $1.80 per thousand cubic feet in third quarter 2018, unchanged from the prior year’s third quarter.

Net oil-equivalent production of 831,000 barrels per day in third quarter 2018 was up 150,000 barrels per day from a year earlier. Production increases from shale and tight properties in the Permian Basin in Texas and New Mexico and base business in the Gulf of Mexico were partially offset by the impact of asset sales of 19,000 barrels per day. The net liquids component of oil-equivalent production in third quarter 2018 increased 25 percent to 654,000 barrels per day, while net natural gas production increased 14 percent to 1.06 billion cubic feet per day.