OTTAWA - In the middle of last fall's election campaign and a few weeks after he was released from a prison in Egypt, journalist Mohamed Fahmy told reporters in Toronto that he felt "betrayed and abandoned by Prime Minister Harper."

But documents prepared by federal diplomats long after Stephen Harper was out of power suggest otherwise, showing that everything that Canada could have been done to shorten the 438 days Fahmy spent in a Cairo jail were being done.

"The government of Canada gave Mr. Fahmy's case high priority and made substantial efforts to assist him throughout his detention and court proceedings," foreign affairs officials wrote in a briefing note prepared earlier this year for Stephane Dion, the new minister. "Senior-level Canadian officials undertook multiple interventions, in Canada and Egypt, for his health and well-being, as well as to call for fair and transparent proceedings in accordance with due process."

Fahmy, reached this week in Vancouver where he is an adjunct professor at the journalism school at the University of British Columbia, disagrees with that assessment. He said the direct involvement of the prime minister could have hastened his release or at least helped improve his treatment in prison.

"I think that Harper may have weighed it politically and decided he didn't want to intervene with all his clout in a complicated manner that included his allies in the Gulf including Saudi Arabia and Egypt," Fahmy said.

Fahmy, who holds both Canadian and Egyptian citizenship, was running the Cairo bureau for Al Jazeera's English-language network in 2013 when he and two of his colleagues were arrested by Egyptian authorities.

They were falsely accused of being members of the banned Muslim Brotherhood, which Egypt considers a terrorist group, and sentenced to years in jail. Fahmy was released last September last year, as Canadian politicians were campaigning for votes.

"Throughout the period of Mr. Fahmy's legal troubles, the Canadian government, including former ministers of foreign affairs John Baird and Lawrence Cannon, raised issues with procedural fairness and concerns about the evidence used to convict Mr. Fahmy," officials wrote to Dion on Jan. 26. "Canada's ambassador to Egypt was heavily involved and made numerous representations to the Egyptian government in regards to this case. The ambassador was also in frequent communication with Mr. Fahey and his wife throughout the duration of his legal case."

The memo was obtained by the Sun via an access-to-information request. In October, during the federal election campaign, Fahmy, standing next to NDP Leader Thomas Mulcair in Toronto, was critical of the Harper government's handling of his case.

"While you here citizens in Canada and around the world clearly understood the urgency of the situation we faced in prison in Egypt, the Harper government did not," Fahmy told reporters. "Sitting in that prison cell, it was difficult not to feel betrayed and abandoned by Prime Minister Harper."