The worst may be over for the beleaguered Canadian oil market, which has been under pressure amid the recent slump in Western Canadian crude prices, according to one energy analyst.

Scotiabank energy analyst Michael Loewen published a report Tuesday stating that the low price for Canadian crude will likely swing higher over the next year, as additional rail and pipeline capacity comes online.

“We expect Canadian heavy and light oil differentials to improve as refining demand returns and egress is slowly built out over the next few quarters,” Loewen wrote in his report.

The price differential between Western Canadian Select (WCS) crude and the North American benchmark West Texas Intermediate (WTI) price has recently soared to record highs of about US$45 a barrel as production growth has surpassed the industry’s ability to move the oil to market.

Loewen expects that WCS-WTI price differential to narrow to US$20 to US$25 a barrel next year due to several factors, including additional capacity via Canadian railways and the addition of Enbridge Inc.’s Line 3 pipeline as well as some relief following planned maintenance in the second and third quarter of 2019.

U.S. oil refiners that process the heavy oil that is typically exported out of Canada are expected to return to market within weeks, Loewen added.

If Canada is able to move more of its crude to market, Canadian oil exporters could be in line for a potential windfall if Mexico follows through with a plan to stop exporting its own oil , Loewen added. Mexico’s Maya heavy oil benchmark may be retained by the country’s domestic refiners as part of Mexican president-elect Andrés Manuel López Obrador’s efforts to improve its energy sector.

This could lead to an opportunity for Canada’s oil industry, Loewen said.

“Ultimately, if Mexico prevents exports, we believe the forecasted fundamentals could see WCS, when located in the [U.S. Gulf Coast], trade significantly tighter to WTI, potentially at a premium,” Loewen said.