Wholesale gasoline prices are expected to keep falling in coming months as U.S. refiners overproduce fuel to try to rebuild low stocks of diesel and heating oil, according to analysts and traders.

U.S. inventories of distillate products, which also include jet fuel, are at the lowest levels in more than a decade. Margins to make those products have remained high due to heavy demand from Europe and elsewhere, and a dearth of refining capacity to meet that demand.

Gasoline demand has also been high, but is waning now that the U.S. driving season is coming to a close. U.S. independent refiners indicated earlier this year that they would continue to run at high rates even if gasoline demand dropped in order to replenish low middle distillate inventories.

Middle distillate inventories held by industry in the Organization for Economic Co-operation and Development totaled 483.6 million barrels in June, down 2.5% from February, according to data from the International Energy Agency.

U.S. gasoline inventories are roughly in line with five-year averages, but are expected to rise because refiners can only shift their processing mix by so much. The gasoline crack spread - the margins made from producing gasoline - fell to $14.59 on Wednesday, lowest since February, and down from a high of $61.95 reached in early June.

Gasoline is historically more profitable to produce, but heating oil margins have spiked because of a global shortage of distillate fuels. That spread is currently at $63.20, near a record high reached earlier this summer.

"Refiners don't want to make gasoline right now but they're forced to make gasoline along with diesel, so they're over-producing gasoline," said John Auers, a refining consultant.

Refiners are currently running at nearly 93% capacity, in line with the five-year average, according to the U.S. Energy Information Administration. A barrel of oil produces roughly twice as much gasoline as diesel.

Demand for U.S. gasoline has faltered by 4.4% so far this year, RBC estimates.

The retail gasoline price is currently $3.764, down 11 weeks in a row from an historic peak of $5.02 per gallon, according to the American Automotive Association.

Europe may not be able to keep producing enough distillates because those products need natural gas for processing, which the continent largely sources from Russia. Moscow has cut off much of its exports of gas to Europe.

Refiners that sell fuel into the Atlantic Basin will be incentivized to continue producing distillate to make up for the lack of refining activity in Europe, Auers said.