President Joe Biden on Wednesday called on U.S. oil refining companies to produce more, saying they need to help alleviate the burden of high prices on consumers.

"At a time of war – historically high refinery profit margins being passed directly onto American families are not acceptable," the president said in a letter to oil companies including Exxon Mobil and Chevron.

"[C]ompanies must take immediate actions to increase the supply of gasoline, diesel, and other refined product," the letter added.

Biden's call comes as sky-high energy costs add to inflationary concerns across the economy. The national average for a gallon of gas crossed $5 over the weekend for the first time on record, according to AAA.

The national average now stands at $5.014, which is 54 cents more than a month ago, and $1.94 more than last year.

Refiners can't just ramp up output, with utilization rates already above 90%. Additionally, some refiners are now being reconfigured to make alternate products like biofuel.

Refining capacity has dropped since the pandemic took hold, which is a factor in the rapid advance of fuel prices. Demand has returned as economies restart and people travel once again, but supply remains tight.