Big oil companies are raking in their highest profits since the onset of the coronavirus pandemic, but they plan to continue spending sparingly to boost production despite higher commodity prices.

Exxon XOM -2.31% Mobil Corp. reported $4.7 billion in second quarter profit Friday, while rival Chevron Corp. reported $3.1 billion in quarterly profit.

The results represented a dramatic turnaround from a year earlier, when Exxon reported a quarterly loss of $1.1 billion and Chevron lost $8.3 billion as demand for oil and gas plummeted due to the closing of economies worldwide due to the virus.

Some of the largest European oil companies also reported strong results earlier in the week. Royal Dutch Shell PLC reported $5.5 billion in net income, while TotalEnergies SE posted $3.5 billion in profits.

The oil-and-gas industry has recovered from unprecedented losses in 2020 as economies have reopened this year, sending prices surging to their highest levels in two years. U.S. oil prices have mostly stayed above $60 per barrel since March, after briefly turning negative last April and remaining below $50 for most of 2020. Oil prices closed at nearly $74 per barrel on Thursday.

Still, none of the major western producers said they would increase capital spending, as the companies face pressure from investors to moderate their growth and clean up their emissions amid concerns about growing regulations and climate change. Some European companies have promised to let production decline as they invest more in renewable energy.

Exxon cut its annual capital budget last year from $25 billion to $19 billion or less. It said Friday its capital expenditures this year will be closer to $16 billion and that its oil and gas production was down 2% from the same period last year.

“We think we have a good plan on our investments, we’re making good progress on debt,” Exxon Chief Executive Darren Woods said on a call with analysts Friday. “We are focused on bringing in more profitable, higher value barrels.”

Chevron said Friday it, too, wouldn’t raise capital spending. It spent $5.3 billion on capital expenditures in the first six months of 2021, compared with $7.7 billion in the first six months of last year. Chevron previously said it would increase annual production at about 3% or less through 2025 and give priority to returning money to shareholders.

Both companies benefited from strong profits in their chemical businesses as demand for plastics and other products have surged this year. Exxon said its chemical unit had its best quarter on record, reporting $2.3 billion in profits.

The restrained spending is an overture to investors who fled the sector after a decade of poor returns and longer-term concerns about the future for fossil fuels.

“Wall Street is not looking for accelerated reinvestment into the oil and gas business,” said Dan Pickering, chief investment officer at Pickering Energy Partners. “This is a combo of ESG and energy transition concerns and scar tissue from the past decade.”

Shares in many oil gas companies have sharply rebounded this year but remain below their pre-Covid-19 prices. Chevron’s stock is up more than 21% this year, but down about 3% from February of last year, while Exxon is up nearly 43%, but is also down about 3% from pre-pandemic prices. An index of large oil-and-gas company stocks is up about 43% this year, but down around 39% from five years ago.

Chevron Chief Financial Officer Pierre Breber said many investors still question oil producers’ commitment to capital discipline, especially with rising commodity prices.