The two largest U.S. oil companies reported surging profits Friday amid high fuel prices.

ExxonMobil (XOM), the country's largest oil producer, reported record profits for the third quarter of $18.7 billion, or $4.45 per share, a 177% increase from the same period last year and a 6% increase over the second quarter. Analysts forecast $3.79 per share.

No. 2 Chevron (CVX) posted earnings of $11.2 billion, nearly double the $6.1 billion from the previous year.

U.S. gas prices actually trended downward for much of the summer after hitting a record $5.02 a gallon in June, but prices remain historically high.

"We recognize the pain that high prices cause," Exxon Chief Executive Officer Darren Woods said during a conference call with analysts. "Unfortunately, the market we're in today is a function of many of the policies and some of the narrative that's floated around in the past."

The national average for a gallon of regular gas this week fell $0.3 to $3.76, according to the American Automobile Association.

In early afternoon trading, ExxonMobil shares rose $2.65, or 2.47%, to $110.20 and Chevron stock rose $0.95, or 0.53%, to $178.85.