U.S. oil and gas producer Occidental Petroleum Corp. beat Wall Street’s earnings estimates and swung to a profit from a year-ago loss, buoyed by soaring oil prices.

The Houston-based company is the latest oil producer to benefit from high commodity prices, despite lower production volumes. Fuel prices have jumped following sanctions on Russia over its invasion of Ukraine in February.

Occidental’s plan to produce oil while it develops technology to tap carbon emissions from fossil fuels gained a renewed vote of confidence after Warren Buffett’s Berkshire Hathaway Inc. raised its stake in the company to about 15.2%.

Occidental reported a $2.1 billion adjusted profit—or $2.12 per diluted share—above the $2.03 per share estimated by analysts consulted by Refinitiv IBES.

Shares were down about 1% in after hours trading, at $58.65, after rising almost 3%.

Occidental, one of the top producers in the prolific Permian Basin of West Texas and New Mexico, said its average realized oil price during the first quarter was $91.91/bbl, up 65% from a year earlier.

Its average daily production was down to 1.08 million boe/d, from 1.14 million boe/d in the same quarter last year. But should recover to around 1.145 million boe/d in the second quarter, it said.

Occidental used some of the extra cash from oil sales to pay another $3.3 billion in debt. And confirmed its previous plan to cut debt to $20 billion in the short-term.

The producer, which borrowed $38 billion to buy Anadarko Petroleum in 2019, has been paying debt and expects to restore its investment grade credit rating in the mid-term. It said it will retire debt as maturities come due in the long-term.

The company’s net profit was boosted by a non-cash tax benefit related to its 2019 acquisition of Anadarko Petroleum. It posted a $4.7 billion net profit, or $4.65 per diluted share, from a $346 million loss, or 36 cents per share, a year ago.

In February, Occidental announced a dividend increase, to 13 cents per share quarterly, along with a $3 billion share repurchase authorization—a distribution program it kept unaltered on May 10.