New York CNN Business  — 

Profits soared at the nation’s two largest oil companies, as ExxonMobil and Chevron both benefited from the recent run-up in oil prices.

ExxonMobil, America’s largest oil company, posted net income of $6.8 billion, swinging to a profit after a $680 million loss a year ago. Oil prices got crushed in the early months of the pandemic, when countries were still limiting travel and economic activity was at a standstill. But they’ve roared back since, surging above $80 a barrel.

Revenue at Exxon soared 60% to $73.8 billion, as average crude oil prices rose 72% from the third quarter of 2020 to the third quarter of this year, according the the US Energy Information Administration. Oil futures topped $85 a barrel for the first time in seven years earlier this week, although prices have retreated slightly since then.

Chevron (CVX), America’s second-largest oil company, reported an adjusted profit of $5.7 billion, excluding special items, its best quarterly result in eight years. The $6.7 billion in free cash flow it generated was a record for the company.

The adjusted profit was not only 34% above the forecasts of analysts surveyed by Refinitiv, it was nearly 17 times greater than the $340 million it earned in the year ago period.

Shares of both stocks were up slightly in premarket trading Friday following the reports. Shares of Exxon are up 56% so far this year through Thursday’s close, while Chevron shares are up 33%.

But as good as financial results are for the oil companies, the industry finds itself under renewed attack for their role in causing climate change. The CEOs of both companies were under fire during testimony on Capitol Hill on Thursday.

Democratic Rep. Ro Khanna urged the CEOs of both companies to follow in the footsteps of their European rivals in planning to cut production to address the climate crisis.

“Are you embarrassed as an American company that your production is going up while European counterparts are going down?” Khanna asked Chevron CEO Michael Wirth.

Wirth responded by pointing out that demand for energy is going up around the world, and declined to pledge to reduce oil production.

“With all due respect, I’m very proud of our company and what we do,” Wirth said.

Exxon CEO Darren Woods similarly declined to commit to reducing production of oil.

“We are committed to lowering our emissions,” Woods said.

– CNN Business’ Matt Egan contributed to this report