President Joe Biden said oil companies need to use their record profits to ramp up production rather than to enrich shareholders.

“My message to the American energy companies is this: You should not be using your profits to buy back stock or for dividends. Not now. Not while a war is raging,” Biden said. “You should be using these record-breaking profits to increase production and refining.”

Profits at the six largest publicly traded oil companies topped $70 billion in the second quarter, Biden said, adding that in the first half of the year, those companies spent $20 billion on buybacks — “the most significant buyback in almost a decade.”

“So far American companies are using that windfall of profits to buy back their own stock, passing that money on to their shareholders, not to consumers,” he said.

Gas prices are averaging $3.85 a gallon in the U.S., dropping off the record high of more than $5 a gallon, set in June. With less than three weeks until the midterm elections, Americans in polls increasingly put the economy and the price of gas at the top of their concerns.

“Invest in America for the American people. Bring down the price you charge at the pump, to reflect what you pay for the product,” Biden said. “You’ll still make a significant profit, your shareholders will do very well, and the American people will catch a break they deserve and get a fair price at the pump as well.”

Biden also officially announced the release of 15 million barrels of crude oil from the Strategic Petroleum Reserve. The White House has released about 165 million barrels of crude from the reserve since the beginning of the year, out of a total that it said would be around 180 million. 

Biden promised to purchase oil to refill the reserve once the price hits $70 a barrel. He said companies should therefore invest now in increased production with the confidence that the government will purchase the oil later.

“My message to oil companies is this: You’re sitting on record profits and we’re giving you more certainty so you can act now to increase oil production now,” he said.

Biden said if retailers and refiners were earning the average profit they have made over the last 17 years, Americans would be paying 60 cents less per gallon.

Correction: This article was updated to correct a bullet point that noted Biden’s target price of crude to refill the Strategic Petroleum Reserve. It’s $70 a barrel.