Moving oil by train could get 200 per cent more popular by the mid-2020s unless at least two pipeline projects are completed, according to an analyst who sees an “acute crisis” over getting oil to market depressing Canadian prices.

The National Energy Board (NEB) said crude-by-rail exports from Canada set another record in June, rising to 204,558 barrels per day. The NEB said in a tweet that June was the first month to crack the 200,000 barrel threshold.

The historic spike in Canadian oil riding the rails was followed last week by a federal court decision to halt construction on the Trans Mountain pipeline expansion. It’s the latest blow to an industry anxious for easier access to markets.

Scotiabank commodity economist Rory Johnston sees Western Canada “operating on the knife’s edge” when it comes to hauling oil away from the region. Relying on more trains rather then pipelines to do the job will be bad news for the price Canadian producers get paid, he said.

“Discounts (compared to U.S. oil) rise to around $20 per barrel when oil-by-rail is needed to transport standard barrels to market,” Johnston wrote in a note to investors. “In times of acute takeaway tightness, rail hasn’t been able to keep up with demand and discounts have spiked towards $30 per barrel.”

Western Canadian Select (WCS), Canada’s benchmark crude, trades at a discount to West Texas Intermediate oil, due in part to differences in quality, refining costs, and the difficulty of getting the oil out of Western Canada. Progress on pipelines to move oil out of Canada’s oil patch will help narrow that spread, he said.

“There are three oil pipeline projects at various stages of the planning process in Western Canada,” Johnston said, referring to Enbridge’s Line 3 (ENB.TO), Kinder Morgan’s (KML.TO) Trans Mountain and TransCanada Corp.’s (TRP.TO) Keystone XL. “We are going need two of those three pipes to satisfy demand for egress out of the Western Canadian Sedimentary Basin by the early 2020s.”

Johnston expects Enbridge’s Line 3 replacement has the best chance of coming online by that time. The $5.3-billion Canadian portion of the project involves replacing 1,070 kilometres of pipeline between Hardisty, Alta. and Gretna, Man. The company expects work to be complete in the second half of 2019.

Johnston is calling for the upward trend for crude-by-rail to continue, even after potential relief from a replaced Line 3.

“In a world where Line 3 is built but TMX and KXL have stalled indefinitely, the additional demand will approach 400,000 barrels per day by the mid-2020s, a 200 per cent increase over current, already record-setting levels,” he said.