Crude-oil prices haven’t been this low in nearly 6 1/2 years, but motorists in some parts of the country have seen a significant rise in prices at the gas pump this week.

Drivers can thank refinery troubles for that puzzling development.

The median price for gasoline in the U.S. Friday stood at $2.559 a gallon, up 6 cents from a week ago but down from $2.699 a month ago, according to retail fuel data site Gasbuddy.com The Chicago region has seen the biggest regional rise, with prices rising more than 60 cents from last week’s average to $3.372 a gallon.

While there have been some signs of moderation, in some places it has been brutal: Prices rose above $5 a gallon in California earlier this week, according to news reports.

Futures on West Texas Intermediate crude oil CLU25, , the U.S. benchmark, fell more than 3% this week to end at $42.50 a barrel after dipping to the lowest level since March 2009.

Gasoline futures US:RBU5 jumped nearly 4% this week to $1.6869 a gallon, the biggest weekly rise since mid-June.

Much of the blame has been put on an outage at a BP PLC BP, -2.96% UK:BP refinery in Whiting, Ind.

The problems in Whiting have contributed to a backup of Canadian crude oil, which at one point this week traded at around half the U.S. benchmark, noted Tom Kloza, global head of energy analysis at Oil Price Information Service, in a phone interview.

The timing of the outage and problems elsewhere come at an inopportune time, exacerbating the spike in gas prices.

Gasoline in metropolitan areas in the summertime must be a reformulated blend. Any small issue

“ “It would take some incredible change in Saudi policy to not see a tremendous drop in gas prices in the last 100 days of the year.” ” — Tom Kloza, global head of energy analysis at Oil Price Information Service

easily throws a monkey wrench in the refining process, Kloza said. Similar problems after Sept. 15 wouldn’t cause any major hiccups.

Also, for the first time in several years, the U.S. is witnessing a summer driving season. Gasoline demand has risen significantly this summer as drivers took advantage of the earlier fall in gasoline prices.

Kloza is confident gasoline prices will start to fall significantly by September at the latest as seasonal gas standards expire and summer driving comes to an end.

“It would take some incredible change in Saudi policy to not see a tremendous drop in gas prices in the last 100 days of the year,” he said. “The next 30 or 40 days, who knows?”