FOR the past 15 years Canada and Mexico have been joined with the United States in the three-way North American Free-Trade Agreement. But both still set much more store by their bilateral relationship with their superpower neighbour. This has led to sometimes farcical rivalry. To the joy of Canadian officials, Barack Obama is making his first, albeit brief, foreign visit as American president to Ottawa on February 19th. But Mexican officials whisper that their president, Felipe Calderón, got in first with a lunch with Mr Obama days before his inauguration.

More seriously, a growing number of Canadians, including politicians, trade negotiators and former ambassadors, have called for their government to turn its back on NAFTA and put all its efforts into improving bilateral ties with Washington. Canada was always a reluctant member of NAFTA, joining the talks mostly to safeguard gains made in a bilateral free-trade deal with the United States concluded five years earlier. Politicians chafe when Canada is lumped together with Mexico, as happened last year during Mr Obama's campaign when he vowed to renegotiate NAFTA to protect Americans from weak environmental and labour standards. Even more woundingly, Janet Napolitano, the new secretary of homeland security, who is a former governor of Arizona, ordered a review of the northern border, saying that it presented a greater terrorist threat than the southern one.

Peter Harder, a former Canadian deputy foreign minister, argues that NAFTA holds back bilateral ties. “It is not in our interests to allow the speed of three to define the relationship of two,” says Mr Harder. “We have trilateralised for too long.” That view has been echoed by John Manley, a former Liberal deputy prime minister.

In fact many cross-border problems differ only in degree. That applies to the drug trade, gun smuggling, border security, the environment and illegal immigration. All three countries have a stake in the floundering car industry, which is organised on a North American basis. Canada and Mexico are the United States' top two suppliers of imported energy, giving them both an interest in Mr Obama's plans for energy and environmental measures.

Few Canadians speak up for enhancing ties with Mexico. But before leaving Ottawa this month, Emilio Goicoechea, Mexico's ambassador, wrote a rebuttal urging Canada to stay the trilateral course. Trade between the two has grown fivefold since 1994 to $21 billion in 2007—though that is dwarfed by the United States' two-way trade with Mexico, worth $349 billion, and with Canada ($566 billion). Some Canadian companies have invested in Mexico: Bombardier has factories making aircraft parts and trains, while Scotiabank is Mexico's seventh-biggest bank.

In questioning NAFTA, Canadians do not just risk playing to protectionists in America's Democratic Party. Their belief that on its own Canada would get more attention than Mexico also looks misplaced. Canada's economy may be 40% bigger, but its population is much smaller. Mr Obama has recognised that he owes his electoral victory in part to Hispanic voters (most of whom are of Mexican descent). More than half a million Americans live in Mexico. And the security problems in Mexico caused by the American demand for cocaine are a growing worry to policymakers in both countries.

“By working together with Mexico we remain on the radar screen,” says Carlo Dade of the Canadian Foundation for the Americas, a think-tank. Canada's prime minister, Stephen Harper, has made no comment on trilateral relations, except to oppose reopening NAFTA. He has made Latin America a foreign-policy priority, and gets on well with Mr Calderón. When the Buy America provisions of the American Congress's economic stimulus plan hit the news, Mr Harper called Mr Calderón to confer on how to fight protectionism. The Democrats in Congress may have unwittingly handed Canada and Mexico something big their relationship has lacked in the past—a common cause.