The federal government's plan to purchase Kinder Morgan's Trans Mountain pipeline and related infrastructure still faces a potential spoiler in the form of a U.S. national security review — setting up the possibility that U.S. President Donald Trump could veto the deal.

According to the purchase agreement, obtained by CBC News, the completion of the deal is contingent in part on getting clearance from the Committee on Foreign Investments in the United States, a U.S. inter-agency committee chaired by Trump's treasury secretary, Steven Mnuchin.

The purpose of the committee, also known as the CFIUS, is to review transactions that could have an effect on the national security of the United States.

The deal is subject to a CFIUS review because the agreement includes the acquisition of the Puget Sound pipeline, a short spur line of the existing Trans Mountain system that transports Canadian crude oil from Abbotsford, B.C., to refineries in Washington state.

The Canadian government confirmed to CBC that Kinder Morgan and Canada have made a joint voluntary filing to the CFIUS and that it is being reviewed by the committee.

"As outlined in the purchase and sale agreement, CFIUS clearance is one of a number of regulatory and shareholder processes required prior to the completion of the purchase agreement," said Daniel Lauzon, director of communications for Finance Minister Bill Morneau.

"These processes are on track."

It's not clear exactly when the two parties filed to CFIUS, but according to the U.S. Department of Treasury's website, the transaction is subject to a 30-day review period during which the committee members will address "any national security concerns that may arise as a result of the transaction."

Depending on the results of that review, the committee could launch an investigation that would have to be completed within 45 days. Upon completion of the investigation, the committee might then refer the transaction to Trump for approval.

Daniel Ujczo, an international trade lawyer who specializes in Canada-U.S. relations, said the review itself is not a major hurdle — but it could become one if Trump holds up the project to secure leverage in trade disputes with Canada.

"Legally, this is not a big deal, as long as there is no foreign ownership outside of Canada," said Ujczo.

"But politically, this could be used as a counterweight if things start going bad in NAFTA. It could be used as a club politically."

Green Party Leader Elizabeth May, who opposes the Trans Mountain pipeline project and the government's planned purchase of it, raised questions about the government's decision to negotiate a contract that includes this stipulation.

"I really wonder if it was wise to negotiate a contract that includes the Puget Sound pipeline and now engages the threat that Trump can add this to the list of things that are up in the air while he negotiates larger items with Canada and Mexico," she said, citing Trump's highly controversial decision to impose steel and aluminum tariffs on Canada using national security as justification.

"Now, in any common sense understanding of a national security concern, there are none. But there are no national security concerns either with Canadian steel and aluminum going into the U.S., and we know that President Trump just claimed there were national security concerns on applying tariffs against our aluminum and steel."

May said that had she been the one negotiating the deal, she would have asked Kinder Morgan, "Are you kidding us?"

"You want us to buy the Puget Sound pipeline and engage this level of, at least, uncertainty, potential obstacle, that we need the U.S. executive, the cabinet, to sign off and say there are no national security concerns for us?" she said.

Toronto-based trade lawyer Mark Warner said the transaction strikes him as something that should be routinely approved in the U.S., although, he notes, these are not normal times on the trade file.

"Once you get into a tit-for-tat trade war and you're using very bellicose language, it does run the risk that the Americans could use this as a case to make an example of us," he said.

"It's way too early to say that they would do that. I suspect that this will just go through on a normal course and be reviewed."

The federal government announced at the end of May it had reached a deal with Kinder Morgan Canada to purchase the pipeline and related infrastructure for $4.5 billion, and that it could spend billions more to build the controversial planned expansion. Ottawa said it was taking the unusual step of buying into the project in order to ensure the expansion's completion in the face of intense political opposition in British Columbia.

The Trans Mountain expansion will build a new pipeline roughly parallel to the existing, 1,150-kilometre line that carries refined and unrefined oil products from the Edmonton area to Burnaby, B.C.

It will nearly triple the line's capacity to 890,000 barrels a day. Trans Mountain is the only pipeline carrying Alberta crude to the West Coast, and the hope is that most of the oil will end up in tankers bound for Asia.