By ROB GILLIES and JAMES MACPHERSON

TORONTO — Following the Obama administration’s rejection of the Keystone XL pipeline, the oil industry faces the tricky task of making sure the crude oil targeted for the pipeline still gets where it needs to go.

The pipeline, first proposed by TransCanada Corp. in 2008, was projected to carry 800,000 barrels a day of crude from Canada and North Dakota down to Nebraska, where existing pipelines would bring it to refineries on the Gulf Coast.

Keystone XL was expected to come online toward the end of this decade. Until then a combination of existing pipelines and railroads was expected to be enough to handle anticipated production. Now the question becomes whether there will be enough pipeline capacity to move the oil and keep costs from getting too expensive.

Skip York, vice president of integrated energy at consultancy Wood Mackenzie, said the oil industry “didn’t need Keystone today,” but will need the capacity in the future. President Barack Obama’s decision means shipping the oil will require “a more expensive form of transportation than it would have with Keystone XL,” he said.

At the moment, the biggest impediment to the flow of oil is low prices. Oil has averaged about $50 this year, making many projects in the Canadian oil sands uneconomical. According to Wood Mackenzie, projects totaling about 485,000 barrels a day have been delayed this year. Canadian oil producers still expect production to rise to 5.3 million barrels a day in 2030, up from 3.7 million barrels a day in 2014, even after lowering their forecast to take into effect the impact of lower prices.

The U.S. imports more crude oil from Canada than from any other country, about 3.4 million barrels a day as of August, according to the U.S. Energy Information Administration.

Tim McMillian, president and chief executive officer of the Canadian Association of Oil Producers, is concerned that the rising cost of getting oil to market could hurt the Canadian industry’s competitiveness. Last month, Shell abandoned an oil sands project in Alberta, and its CEO pointed to concerns about high costs and insufficient pipeline capacity for the decision.

McMillan said other proposed pipeline projects should be able to help make up for lost shipments via Keystone XL.

About 100,000 barrels a day of the oil that was supposed to move through Keystone XL would have come from North Dakota, where a boom in unconventional drilling has propelled it to become the No. 2 producing state in the U.S. behind Texas.

Keystone XL would have reduced some of the dependence on rail and truck shipments, said Kari Cutting, vice president of the North Dakota Petroleum Council, which represents more than 500 companies working in the state’s oil patch.

North Dakota produces about 1.1 million barrels a day, with about half of it moved by rail, down from about 70 percent a year ago. Recent derailments and fires involving North Dakota crude – including an explosion in Quebec two years ago that killed 47 people – have drawn criticism from lawmakers and the public about using trains to move oil.

Keystone XL would have replaced at least one, mile-long oil train each day, state and industry officials say.

Now, not having the pipeline built means railroads will get to keep much of the business they’re already hauling.