For two years now, the Harper government has been eagerly wooing Nigeria. It has sent a wave of cabinet ministers to Nigeria, anointed it one of Canada's top "strategic partners" in Africa, set up a joint commission and vowed to double Canadian trade with the oil-rich West African country by 2015.
It was perhaps an obvious target. With 170 million people, Nigeria is the most populous country in Africa, one of the fastest-growing, and will soon be the biggest economy on the continent. It's also Canada's biggest trading partner in Africa, and a significant source of Canadian oil imports.
Yet those years of courting Nigeria could be undermined by Ottawa's vocal advocacy of an entirely separate issue: gay rights.
Nigeria's media this week are filled with angry attacks on Canada, accusing it of cancelling a planned visit to Canada by President Goodluck Jonathan next month in retaliation for Nigeria's latest anti-gay law, which could imprison gays for 14 years.
The backlash erupted after Canada criticized the law that Mr. Jonathan signed last week. "Canada is deeply concerned that Nigeria has adopted a law that further criminalizes homosexuality," Foreign Affairs Minister John Baird said. "We call on Nigeria to repeal this law."
As many African countries grow increasingly resentful of Western criticism of their anti-gay laws, and as Ottawa remains determined to speak out on the controversial issue, the conflicts could jeopardize the economic relations that the Harper government has worked hard to improve.
In a visit to Nigeria in 2012, Mr. Baird used a Canadian hockey metaphor to explain why the African country was such a key target for his government. Nigeria, he said, is where the puck is going to be.
That might still be true. If the current disputes continue, however, the two countries might find themselves in the penalty box for fighting before they reach the puck.
There is no official confirmation that Canada cancelled a visit by the Nigerian president. But it is clear that the two countries had been discussing a potential visit by Mr. Jonathan in mid-February, and many Canadian business leaders had expected the visit soon. Now the Canadian Foreign Affairs Department will only say tersely: "No visit is scheduled."
The presidential visit had been seen as a major step in expanding Canada's relations with Nigeria. But one Canadian business leader with Nigerian investments said it was probably decided by mutual consent that Mr. Jonathan should postpone his visit, with the furor over the anti-gay law being a key reason.
To prevent any serious damage to the relationship, Ottawa used careful wording in its official statement, seeking to avoid a deliberate snub of the Nigerian leader. "We look forward to the opportunity of welcoming President Jonathan to Canada at a future date," said Béatrice Fénelon, a spokeswoman for Mr. Baird's department.
In the Nigerian media, hundreds of commentators were infuriated by Mr. Baird's criticism of the anti-gay law and the subsequent reports that Canada had cancelled the presidential visit. "Nigeria should withdraw their embassy from idiot Canada now and let Canada leave Nigeria now," one person wrote on a popular website. "Canada can go to hell," another added. "Nigeria cannot succumb to their bullying."
One Nigerian newspaper, Vanguard, also claimed that the Canadian "homosexual lobby" had been "harassing" Nigerian diplomats. It did not provide any evidence for the claim.
Canada was far from the only opponent of the Nigerian law. The United States and the European Union made similarly sharp critiques. But the outspoken comments by Mr. Baird and the reported cancellation of Mr. Jonathan's visit have made Canada a particular target for the backlash.