After a string of losses, ExxonMobil said Friday it returned to profitability in the first quarter, bolstered by a significant jump in oil and natural gas prices.

The oil giant, which reported losses in all four quarters in 2020, reported profits of $2.7 billion in the first quarter. Revenues rose 5.3 percent to $59.1 billion.

The company said its average price for crude oil sold rose 42 percent compared with the fourth quarter, while natural gas prices rose by 33 percent.

Those better conditions in the exploration and production business offset the anemic state of ExxonMobil's downstream business tied to refining crude into gasoline.

Conditions in the downstream business improved from the fourth quarter, "but remained below 10-year lows driven by market oversupply and high product inventory levels," ExxonMobil said.

ExxonMobil reported profits in the first quarter after a string of losses in 2020
ExxonMobil reported profits in the first quarter after a string of losses in 2020 GETTY IMAGES NORTH AMERICA / Michael loccisano

But ExxonMobil enjoyed heady conditions in its chemical business, where profits surged due to "continued strong demand, global shipping constraints and ongoing supply disruptions, particularly in North America," the company said.

ExxonMobil has been under scrutiny from Wall Street over its debt level, which exceeds that of Chevron and other rivals. The company pledged to maintain its 2021 capital budget in the previously-planned range, saying additional cash generated would go to paying down debt.

The company also said it made progress on its "energy transition strategy," which is developing large scale projects for carbon capture and storage.

At its annual meeting next month, the oil giant faces a challenge from activist investor group Engine No. 1, which has nominated competing directors to more forcefully shift the company's response to climate change.

Shares of ExxonMobil fell 0.5 percent to $58.65 in pre-market trading.