In September, two months after China's state-owned CNOOC Ltd made an unexpected $15.1-billion bid for Canadian energy company Nexen Inc, Canada's spy agency told ministers that takeovers by Chinese companies may threaten national security.
The rare warning from the Canadian Security Intelligence Service (CSIS), which was disclosed to Reuters by intelligence sources, did not stop the takeover, that was approved by Canadian authorities earlier this month.
But the intervention and an influential US lawmaker's warning in October that Canadian companies should be careful about doing business with Chinese telecom equipment companies Huawei Technologies Co and ZTE Corp made the approval process for the deal more difficult than initially expected.
"CSIS did not like the Nexen bid and thought it was a bad idea for Chinese firms to be investing in the oil sands. It all played into their greater fears about firms like Huawei," said one person familiar with the agency's concerns. "They do not want to wake up one day and realise a crucial sector of the economy is under the control of foreign interests."
And after listening to the spy service, which usually keeps a low profile, Canada drew up surprisingly tough foreign investment rules that were unveiled when approving the Nexen deal, China's biggest-ever successful foreign takeover. In a clampdown on companies it deems influenced by foreign governments, Canada will block similar purchases in the future.
CSIS has been silent about what it said to Ottawa on the Nexen transaction, and it declined to comment for this story. It didn't specifically recommend the CNOOC deal be blocked, but rather warned more generally about such deals with Chinese entities, the person said.
In reality, the government was unlikely to want to block the CNOOC bid, given a high-profile push by Prime Minister Stephen Harper earlier in the year to boost ties with China, and given that a lot of Nexen's assets are outside Canada, and it has underperformed other energy companies.
By pushing back aggressively, CSIS ensured that it got foreign investment policy tightened significantly to deter similar such takeovers by companies under the sway of foreign governments.
"I think people at CSIS and elsewhere are going 'Good. That was a very good response by the government'," said Ray Boisvert, a former CSIS assistant director of intelligence, who retired this year after almost three decades at the agency.
"It did reflect some of those deep strategic concerns that practitioners have had about this kind of investment."
Specific worries include theft of Canadian intellectual property, espionage, computer hacking and foreign companies gaining too much influence over crucial sectors of the economy, said the person familiar with the agency's views.
The government could, in theory, nationalise assets if it thought foreign control was problematic. But the pro-business Conservatives would likely find it politically unpalatable to take such a step.
"To be blunt, Canadians have not spent years reducing the ownership of sectors of the economy by our own governments, only to see them bought and controlled by foreign governments instead," Harper said as he announced the new investment rules.
In October, the US House of Representatives' Intelligence Committee urged US firms to stop doing business with Huawei and another Chinese telecom equipment company ZTE on the grounds that Beijing could use products made by the two companies to spy.
The House Intelligence Committee's chairman, Rep Mike Rogers, a Michigan Republican, urged Canada to take a similar stance, and two days later, the Canadian government indicated it would not let Huawei help build a secure government communications network because of possible security risks.
"The Huawei business caused a lot of political complications for the CNOOC bid," another person familiar with the CNOOC deal said of the US committee's report.
Both Huawei and ZTE have repeatedly denied the allegations in the report, and China's foreign ministry dismissed as "baseless" the idea that security concerns could impede commercial ties.
"We hope that the relevant party can objectively and justly treat Chinese companies' overseas investment and cooperation plans, and stop actions which harm Chinese companies' image and do more to benefit the promotion of bilateral trade and business cooperation," said ministry spokeswoman Hua Chunying.
In its annual report, released in September, CSIS noted risks that included espionage and illegal technology transfers, and said some foreign state-owned enterprises had "pursued opaque agendas or received clandestine intelligence support for their pursuits" in Canada.
The agency did not give details, but added: "When foreign companies with ties to foreign intelligence agencies or hostile governments seek to acquire control over strategic sectors of the Canadian economy, it can represent a threat to Canadian security interests."
CSIS, hit by controversy in 2010 after its head suggested China had too much influence over some Canadian provincial politicians, did not mention any country or firm in its report.
It is unclear how much, if any, influence the United States had on the Canadian authorities' foreign investment policy.
Fen Hampson, head of the global security program at the Centre for International Governance Innovation in Waterloo, Ontario, said he had learned that a US official visited Ottawa in the last few months to discuss mutual concerns about foreign state-owned enterprises.
US Ambassador David Jacobson told Reuters he was not aware of such a meeting, but he noted that officials from the two countries met constantly. "I would be surprised if almost any issue you could think of has not come up in one or more of those conversations," he said. "The United States has not sought to influence Canada's decision with respect to that (CNOOC's bid)... We respect that decision."
The Canadian government did not respond to a request for a comment.
Chinese companies have bought up smaller Canadian energy firms before, but the July 23 bid for Nexen was their first attempt to buy one of the larger players.
Nexen has assets in Canada, the North Sea, Nigeria and the Gulf of Mexico. Technology that Nexen and its partners use for deep sea drilling could interest CNOOC.
Asked about the CSIS concerns, a spokeswoman for Industry Minister Christian Paradis replied: "The government has the authority to take any measures it considers necessary to protect national security."
Yet two people close to the deal noted that the Canadian government did not exercise its option to do a separate review of the potential security risks of the CNOOC-Nexen bid, again signaling its concerns were tied to overall Chinese investment rather than to this particular deal.
Under the new rules, which Paradis is responsible for enforcing, foreign state-owned enterprises can no longer buy controlling stakes in assets in the oil sands, the biggest reserve of crude oil outside Saudi Arabia and Venezuela.
Such enterprises can buy minority stakes in the oil sands, or majority stakes in companies outside the oil sands. Companies deemed to have strong government links will be treated with particular caution wherever they propose to invest.
"When it comes to our security and intelligence services, they would rather pull up the drawbridge than let it down," said Hampson, co-author of a report on trade ties between Canada and emerging nations that he discussed with Harper in June.