Canada's spy agency has been frustrated in trying to track Canadians who travel overseas to fight for ISIS and other extremist groups because the country's diplomatic service is refusing to play ball.

That's the complaint of the Canadian Security Intelligence Service, which says Global Affairs Canada (GAC) has not volunteered key security information, and drags its feet when asked for specific files on citizens and others.

The rare glimpse into a squabble between spies and diplomats appears in a document obtained by CBC News under the Access to Information Act.

Security expert Wesley Wark suggests Canada's diplomatic service may be uncomfortable working alongside CSIS agents abroad, which could help to explain the reluctance of Global Affairs Canada to share personal information about Canadians. (Sean Kilpatrick/The Canadian Press) The spy agency has been "concerned that GAC was not sharing information in a proactive manner and that its vetting process for responding to CSIS requests was causing lengthy delays," says a November 2015 account of the dispute.

The problems occurred just months after controversial anti-terrorism bill, C-51, became law. The legislation was designed to smooth security information sharing among 17 federal agencies, including CSIS and Global Affairs Canada.

Canada's privacy commissioner railed against the bill, saying it set the bar too low and unreasonably intrudes on privacy. The Liberals helped pass C-51, but since forming the government have said they will improve on it, though without providing specifics.

A Canadian Press report in March said at least four federal agencies have already used the information-sharing powers conferred by the bill, including CSIS.

Transition fraught

But the newly released document shows the transition has been fraught — largely because of the reluctance of the diplomatic service to hand over personal information on Canadians gleaned from passports and consular services.

"CSIS has been in discussions with GAC to address challenges with respect to timely sharing of information related to threats to national security, for example Canadians travelling overseas to fight for extremist groups," says the RCMP document, signed Dec. 1 by Commissioner Bob Paulson.

Former Canadian diplomat Gar Pardy says a law, known as Bill C-51, allowing Canadian agencies to share personal information about Canadians is under review by the Liberal government, and so the rules remain uncertain. (Fred Chartrand/Canadian Press) The RCMP, CSIS and Global Affairs were in talks last fall to break the logjam, drafting a "declaration" to "facilitate timely information sharing" based on what Canada's diplomats gathered from citizens visiting or contacting embassies and missions, among other things.

For somebody to complain about implementation [of C-51] is a bit early in the day. - Gar Pardy, former Canadian diplomat

A spokeswoman for CSIS, Roxanne Ouellette, declined comment on the "specific operational issues" raised by the document, saying only that the spy agency works in "close collaboration" with the diplomatic service.

John Babcock of Global Affairs Canada, however, said a letter the department signed with CSIS and the RCMP "was sent to Canadian missions abroad in order to ensure that all stakeholders share a consistent understanding of the provisions of the Security of Canada Information Sharing Act," the section of C-51 that allows agencies to trade personal information for anti-terror purposes.

Security expert Wesley Wark, who examined the document for CBC News, said the strained relationship between spies and diplomats can be traced back to the Maher Arar inquiry, which criticized Canadian information sharing that eventually put Arar into a Syrian torture cell.

Global Affairs wants to avoid being "dragged through the mud of an Arar inquiry, for failing to offer appropriate consular and privacy law protections."

Traced to Arar inquiry

Wark added that Global Affairs "is still getting used to the fact that CSIS is not just a domestic security intelligence organization but increasingly has an important foreign intelligence gathering role, operating in the same overseas arenas where some of our more critical embassies and consulates have to operate, e.g., the Middle East."

Former Canadian diplomat Gar Pardy also traced current tensions back to the 2006 Arar inquiry, which raised troubling questions about information sharing both within and outside Canadian government circles.

Public Safety Minister Ralph Goodale has said Bill C-51 will be improved, but has not provided any specific details. (CBC News) Pardy said C-51 did not entirely clarify when personal information could be shared, and that its provisions in any case may be moot because Public Safety Minister Ralph Goodale has said changes are coming.

"This is a large area where I think there's considerable uncertainty," he said in an interview, adding he can understand the reluctance of officials at Global Affairs about handing over information to an insistent CSIS.

"For somebody to complain about implementation [of C-51] is a bit early in the day," Pardy said.

The omnibus legislation, which became law in June and expanded Canada's no-fly list, came under fire from the NDP and civil liberties groups that said it tilted the balance too far in favour of police and security agency powers.

Follow @DeanBeeby on Twitter