Canada will purchase Kinder Morgan's TransCanada pipeline and related infrastructure in a C$4.5bn ($3.4bn; £2.6bn) federal investment.
The deal will see Canada become the owner of the pipeline and all of Kinder Morgan Canada's core assets, and in return Kinder Morgan will continue construction on the twinning of the pipeline this summer.
Bill Morneau, Minister of Finance, said that this is an investment in Canada's future.
"So our message today is simple: when we are faced with an exceptional situation that puts jobs at risk, that puts our worldwide reputation on the line, our government is prepared to take action", he said.
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.More news: Emilia Wickstead alleges that Meghan Markle’s wedding gown is a rip-off
The plan - similar to how Canada financed and managed shares in General Motors and Chrysler in 2009 during the financial crisis - will include a new Crown corporation to manage the project.
There has been intense opposition towards the project from environmental groups and some Indigenous communities in B.C.
Alberta Federation of Labour president Gil McGowan said he's impressed with the federal government for "taking decisive action".
The Alberta government is also supporting the project and will provide an "emergency fund" to cover unforeseen costs "if needed".
"This move sets a bad precedent and signals to other prospective investors that large projects such as pipelines can not be built by private industry in Canada", said Aaron Wudrick, federal director of the Canadian Taxpayers Federation, a right-leaning group that advocates for lower taxes. The expansion project received federal approval in 2016.More news: EU proposes to ban plastic straws, stirs, and cotton buds
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.
Buying the pipeline outright had become increasingly likely after Prime Minister Justin Trudeau first pledged only to backstop it.
The pipeline would allow Canada to diversify and increase exports to Asia, where it could command a higher price.
Canada loses $15 billion every year on the sale of oil because the USA remains its only export customer, resulting in a lower price, Trudeau argues.More news: Rudy Giuliani booed by Yankees fans on his birthday