Canada's federal government said it is buying a controversial pipeline from the Alberta oil sands to the Pacific Coast to ensure it gets built.

Prime Minister Justin Trudeau's government plans to spend $4.5 billion Canadian (US$3.4 billion) to purchase Kinder Morgan's Trans Mountain pipeline.

The pipeline expansion would triple the capacity of an existing line to ship oil extracted from the oil sands in Alberta across the snow-capped peaks of the Canadian Rockies. It would end at a terminal outside Vancouver, resulting in a seven-fold increase in the number of tankers in the shared waters between Canada and Washington state.

Houston-based Kinder Morgan earlier halted essential spending on the project and said it would cancel it altogether if the national and provincial governments could not guarantee it.

"It must be built and it will be built," Finance Minister Bill Morneau. "Make no mistake: this is an investment in Canada's future."

The pipeline would allow Canada to diversify and increase exports to Asia, where it could command a higher price. Canada has the world's third largest oil reserves but 99 percent of its exports now go to refiners in the U.S., where limits on pipeline and refinery capacity mean Canadian oil sells at a discount.

"For too long we have relied on one trading partner for our oil and gas exports," Natural Resource Minister Jim Carr said.

The project has pitted Alberta against coastal British Columbia, where concerns about fisheries, real estate values, tourism and ocean ecology are high. Vancouver Mayor Gregor Robertson calls the pipeline an unacceptable risk that threatens 10,000 jobs in the harbour.

Crude oil storage tanks
Crude oil storage tanks are seen at the Kinder Morgan terminal in Sherwood Park, near Edmonton, Alberta. REUTERS/Chris Helgren REUTERS/Chris Helgren

The Trans Mountain expansion is projected to lead to a tanker traffic balloon from about 60 to more than 400 vessels annually as the pipeline flow increases from 300,000 to 890,000 barrels per day.

Morneau called it an "exceptional situation" that's in the national interest and said the government doesn't intend to be a long-term owner of the pipeline. The government is buying the existing pipeline and the scheduled twinned pipeline expansion. The federal cabinet approved the purchase on Tuesday.

Steve Kean, chairman and chief executive of Kinder Morgan Canada Ltd., said the deal represents the best opportunity to complete the expansion project. "We've agreed to a fair price for our shareholders and we've found a way forward for this national interest project," he told a conference call with financial analysts.

Analysts have said China is eager to get access to Canada's oil, but largely gave up hope that a pipeline to the Pacific coast would be built.

Trudeau approved the expansion, arguing that it was "economically necessary" and enabled him to overcome opposition to a carbon tax plan that will help Canada cut its greenhouse emissions.

But many indigenous people see the 620 miles (1,000 kilometers) of new pipeline as a threat to their lands, echoing concerns raised by Native Americans about the Keystone XL project in the U.S. Many in Canada say it also raises broader environmental concerns by enabling increased development of the carbon-heavy oil sands.

Alberta Premier Rachel Notley cheered the news of the purchase on Twitter. "This project has more certainty than ever before. We won't stop until the job is done!"