Gas prices are on the rise again in Calgary and have now spiked above the national average, something that's only happened a handful of times in the past decade.

Average retail prices reached $1.12 per litre in the city on Tuesday, well above the Canada-wide average of $1.05, according to data from GasBuddy.com.

Slowdowns — or outright shutdowns — at a dozen major refineries in the American Midwest that feed the Canadian Prairies with gasoline are largely to blame for the sudden surge in pump prices in Calgary, according to senior GasBuddy.com analyst Dan McTeague.

Combined with a "huge bulge" in demand for gasoline in the United States and a weak Canadian dollar, he added it creates a "perfect storm" for price volatility— even in oil rich but refinery-poor Alberta.

"Crude is an important product but so is the ability to produce refined product, and if we don't have enough to meet our own domestic needs, you can expect that a problem south of the border becomes a much bigger problem for Canadians," McTeague said.

Gas prices in Calgary surged up above the national average in September 2015, something that is rarely seen. (GasBuddy.com)

Gas prices in other parts of the country have been less affected because they aren't supplied by the same group of Midwest refineries that have seen a series of planned and unplanned shutdowns for maintenance.

Pump prices in Toronto were 12 cents lower than in Calgary on Tuesday, for example, despite significantly higher taxes on gasoline in Ontario's biggest city, McTeague noted.

Calgary has historically seen gas prices lower than the Canadian average. (GasBuddy.com)

"It just goes to show you how significant refinery disruptions in the U.S. are," he said.

McTeague expects gas prices in Calgary to continue to be affected by the slowdown in Midwest refinery capacity, as much of the maintenance work isn't expected to wrap up until mid-October or early November.