The federal government had to apologize to a visiting Salvadoran judge for some out-of-date information about his country.
Eugenio Chicas was detained at Toronto's Pearson Airport for 24 hours last week after, he said, officials told him he was a member of a questionable organization.
Judge Chicas, of El Salvador's main electoral institution, said in an interview that representatives from the Canada Border Services Agency repeatedly pointed out his affiliation with the Farabundo Marti National Liberation Movement or FMLN.
The FMLN was the revolutionary guerrilla group that fought the government in a brutal civil war between 1980 and 1992. Judge Chicas was once a senior commander in the former military movement, and is a high-profile member of the party.
But the FMLN now is the governing party in El Salvador. Canadian Minister of State Peter Kent attended the presidential inauguration this spring alongside U.S. Secretary of State Hillary Clinton.
"They told me that because of my affiliation with the organization, they wouldn't let me into the country," Judge Chicas said from San Salvador.
"I told them that the war in El Salvador ended 17 years ago and the FMLN is now the governing party in El Salvador, but they told me that was the information they had available."
Members of the Salvadoran community in Toronto as well as the embassy worked to set the record straight.
Eventually Judge Chicas was allowed to leave and attend a meeting of inter-American electoral bodies in Ottawa this week, hosted by Elections Canada and the Organization of American States.
He said he was personally invited by the Canadian government to attend.
Border officials kept his diplomatic passport and instructed him to promptly return to Toronto after the conference to get his flight home.
Judge Chicas said he was treated respectfully, but was inconvenienced, missing his flight to Ottawa.
"I obviously felt uncomfortable because I had been in Canada on two previous occasions, in Toronto, and never had a problem."
The CBSA would neither confirm nor deny the matter, nor would Elections Canada. Mr. Kent's office would say only that the two men met at the conference.
But the embassy of El Salvador and Judge Chicas said they had received apologies from Canadian bureaucrats and Elections Canada for what happened.
The Foreign Ministry of El Salvador will still be sending a diplomatic note to Canada to protest the incident.
"What I think is that the border agency doesn't have its information up to date," Judge Chicas said.
"I precisely told them that they need to figure out who were their real enemies, because issues of national security are sensitive."
The CBSA has faced previous problems with its databases and no-fly lists, picking out certain travellers based on erroneous information. The Auditor-General has also highlighted cases in which front-line customs staff rely on their own experience and instincts that might not be correct in a particular situation.
The Canadian Press reported last week that a Montreal woman was handcuffed and strip searched by customs officials at the Montreal airport in a case of mistaken identity.
Wesley Wark with the University of Toronto's Munk Centre for International Studies says it is unusual for a person travelling on a diplomatic passport to have trouble at the border.
Nonetheless, he said, the CBSA might have held other information that gave it pause.
"It is also responsible for dealing with ... individuals with significant criminal records or indeed war crimes aspects," said Prof. Wark, who sits on the CBSA's advisory council.
"It's conceivable it may have triggered a decision to treat this individual in this particular way."