U.S. oil and gas producer Anadarko Petroleum Corp. (NYSE: APC) posted a better-than-expected quarterly profit on Feb. 6, helped by improved crude prices and cost cuts.

The results reflect the improving environment for the U.S. oil industry as crude prices recover from the lows hit in 2016 after a global crude oil glut. Like many of its peers, Anadarko has vowed to be financially prudent as oil prices recover, saying it will use excess cash for shareholder returns and increase output only when profitable.

Rival Pioneer Natural Resources Co. (NYSE: PXD) also posted a quarterly profit on Feb. 6 that beat expectations.

Anadarko reported net income attributable of $976 million, or $1.80 per share, in the fourth-quarter ended Dec. 31, compared with a loss of $515 million, or 94 cents per share, a year earlier.

Texas-based Anadarko recorded a one-time income tax benefit of $1.11 billion, largely due to changes to the U.S. tax law.

Excluding items, it earned 18 cents per share, beating the analysts’ average estimate of 3 cents, according to Thomson Reuters I/B/E/S.

Sales volumes of oil, natural gas and NGL averaged about 637,000 barrels of oil equivalent per day (boe/d), down from 774,000 boe/d a year earlier.

For the year, it forecast total sales volumes in a range of 238 million to 248 million barrels of oil equivalent (MMboe), down from 245 to 255 MMboe previously.

The company cut its 2018 capital investment outlook to a range of $4.1 billion to $4.5 billion, from $4.2 billion to $4.6 billion previously. The cut was largely due to recent asset sales.

“Our capital investment program this year is well positioned to deliver attractive cash returns that produce healthy production growth,” Al Walker, Anadarko’s CEO, said.

Anadarko’s stock was unchanged in extended trading after closing Feb. 6 at $57.49. The company plans to hold a conference call with investors on Feb. 7 to discuss the results.