NEW YORK (AP) — Exxon Mobil’s second-quarter profit dropped to the lowest level in four years and sales fell as oil prices slumped as OPEC+ ramped up production.

Exxon earned $7.08 billion, or $1.64 per share, for the period ended June 30. A year earlier it earned $9.24 billion, or $2.14 per share.

That was better than Wall Street expected, but Exxon does not adjust its reported results based on one-time events such as asset sales. Analysts surveyed by Zacks Investment Research were calling for earnings of $1.49 per share.

“We achieved our highest second-quarter Upstream production since the merger of Exxon and Mobil more than 25 years ago,” Chairman and CEO Darren Woods said, referring to the company’s exploration and production operations.

Exxon offset lower prices by ramping up production as well. Second-quarter net production was 4.6 million oil-equivalent barrels per day. That was an increase of 79,000 oil-equivalent barrels per day when compared with the first quarter.

Revenue fell to $81.51 billion from $93.06 billion, missing the $82.82 billion that Wall Street was looking for.

Chevron Corp. reported a second-quarter profit of $2.49 billion, or $1.45 per share. Removing one-time costs, earnings were $1.77 per share.

That also was a four-year low for the second quarter, but it too beat Wall Street profit expectations and missed revenue expectations by industry analysts.

Analysts surveyed by Zacks Investment Research expected Chevron per-share earnings of $1.70.

Chevron’s quarterly revenue was $44.82 billion.