Abderrahmane Ghanem, a 30-year-old Canadian from Calgary, has been held for nearly a year in the El-Harrach prison in Algeria.

Ghanem, who also holds Algerian citizenship, is charged with being a member of a terrorist group outside Algeria. His trial is set to begin next month. If found guilty he likely faces up to 20 years in jail.

His family and lawyers are speaking out and told CBC and the Toronto Star they believe the charge has to do with Ghanem's past association with people who have been radicalized in Calgary and went to fight for extremist groups in the Middle East.

Gary Caroline, a Vancouver lawyer retained by Ghanem's father Mohamed, says he believes Canada's security agency shared critical information with Algeria that resulted in Ghanem's detention.

Omar Alghabra, Canada's parliamentary secretary for consular affairs, says he "has seen no evidence of that." He declined a request from CBC News and the Toronto Star for an interview, but provided the following statement:

"Our officials have been active on his case and are engaged with the Algerian authorities to ensure that his well-being and rights are protected. We are also engaged with his Canadian legal team." Ghanem's father, Mohamed, said that his son is not the type of person to get involved in violence, never joined a terrorist group and never committed a crime. (Ghanem family)

Mohamed Ghanem denies that his son has ever joined a terrorist group and insists that he never committed a crime. "He is being punished for the actions of others," he said.

Ghanem's Algerian lawyer is accusing the Canadian government of "subcontracting" his client's prosecution to Algeria because it couldn't get away with prosecuting him in Canada, said Caroline.

He also says Ghanem is being held with 75 men in a unit that has only 36 beds and one shower that doubles as a toilet.

Asked whether the Canadian Security Intelligence Service was involved in the case, Tahera Mufti, its chief of public affairs, told CBC News, "For reasons of security and privacy, CSIS does not divulge details of the information it exchanges or the identity of the foreign agencies with which it partners.

"CSIS' information sharing with foreign partners is conducted in strict accordance with the CSIS Act, ministerial direction and a robust system of internal policies and procedures."

Foreign governments may of course take legal action on the basis of their own information. — Tahera Mufti, chief of public affairs for CSIS

CSIS has "a duty and a responsibility to share threat-related information with its foreign partners in order to mitigate risks to public safety here and abroad," Mufti said.

"If we do so, it is after careful consideration of all legal obligations and associated risks, and includes strict controls on the use and dissemination of information.

Omar Alghabra, Canada's parliamentary secretary for consular affairs, responds to a question in the House of Commons on June 2, 2016. 'Our officials have been active' on Ghanem's case, Alghabra says. (Sean Kilpatrick/Canadian Press) "As a general rule, information which CSIS shares with foreign partners may not be used in judicial proceedings without the service's express consent. Foreign governments may of course take legal action on the basis of their own information."

Mohamed Ghanem says his son, whom he calls Abdu, is prepared to return to Canada. "If he has to go to trial in Canada, it's fine," Mohamed told CBC News and the Toronto Star at his home in Muscat, Oman.

Mohamed admits that between 2010 and 2012 his son associated with several men from Calgary who eventually left to fight in Syria.

"The ones that he is hanging out the most are Damian Clairmont, Wassem Alhaj Youcef, and they used to hang out with Badi Hammadieh," said Ghanem's father.

Mohamed says that during one of his first meetings with Canadian authorities in Calgary he was informed that Badi Hammadieh, an associate of his son, was "pushing young Calgarians to go to Syria" and he was told that "this guy was brought out of jail in Syria by the Canadian government."

Secret meetings at a mosque

CBC News has reported that before many of the men began leaving in late 2012 for Syria and Iraq, nearly a dozen of them met secretly in a room above the 8th and 8th mosque in downtown Calgary.

Last week CBC News reported that the mosque has permanently closed its doors and is planning to move to a new location yet to be determined.

CBC News learned that members of the study group also met frequently in one of the apartments they rented in the highrise building connected to the 8th and 8th mosque.

Mohamed says that while he was concerned about his son's association with these men he "hadn't noticed anything abnormal with him."

"I know my son, he wasn't a violent person," said Mohamed. "He is not the type of person that will get involved in violence. He never fought with anyone in his life. Never," Mohamed told CBC News. Navaid Aziz, the imam of a Calgary mosque that has closed after being investigated for radicalization, says Ghanem's friends who left to fight in the Middle East did nothing in front of him to arouse his suspicion. (Devin Heroux/CBC)

Navaid Aziz recalls his encounters with the men shortly after he was appointed an imam at the 8th and 8th mosque.

He says the men did nothing in front of him that would have aroused his suspicion.

Suddenly the men started leaving Canada in late 2012, said Aziz. First it was Clairmont, followed by his roommate Youcef, then Salman Ashrafi, and around the same time, Tamim Chowdhury. All four have been killed.

When Ghanem left Calgary, authorities must have thought he too was heading for the conflict zones, says Mohamed. But he says he had no doubt his son's destination was always Algeria, where he has extended family members.

Serious injuries on a hiking trip

Mohamed told CBC News his son left Calgary after suffering serious injuries during a hiking trip on May 19, 2012. Ghanem was hiking with friends Clairmont and Youcef in the Kananaskis mountains, Mohamed said.

"Waseem first got injured and Abdu was trying to help him when he stepped on a rock and rolled 75 feet down the hill," Mohamed said. He says his son dislocated his shoulder, broke his ribs and an arm and suffered head injuries.

"Damian Clairmont saved them. He helped them go down the mountain then drove to a gas station to call 911," said Mohamed.

He says his son took several months to recover but in the process he lost his job and became despondent. He decided to visit family in Algeria. Christianne Boudreau and her son, Damian Clairmont, 22, who was killed fighting alongside Islamic extremists in Syria. Ghanem was 'hanging out' with Clairmont in Calgary, his father says. (Boudreau family/Canadian Press)

By the time Mohamed bought his son an airline ticket to Algeria in late 2012, the Calgary cluster was on the radar of CSIS and the RCMP.

Shortly after Ghanem left Calgary, his father was contacted by a CSIS agent, and they met at coffee shop.

Mohamed says the agent told him that friends of his son were leaving Canada for "conflict zones in the Middle East," and "they wanted to know about Abdu."

He says he provided his son's phone number and address in Algeria to the CSIS agent and he offered to call his son during the meeting.

As a family we think we are being punished for something we have never done. — Mohamed Ghanem , father of Abderrahmane

While Ghanem was trying to set up a business in Cairo in mid-2013, Caroline says, brothers Gregory and Collin Gordon arrived and stayed with Ghanem for three weeks.

CBC News has reported the brothers were members of the Calgary cluster. They joined ISIS after transiting through Egypt. Both are believed to have been killed in December 2014 fighting for ISIS.

During his time in Egypt, Mohamed says, his son met with CSIS agents three times. During one of those meetings an agent "warned him not to go to places like Sinai or Syria," said Mohamed. Ghanem on a hike in 2011. His lawyer, Gary Caroline, says the Canadian government has 'deliberately breached a number of moral and legal duties owed to Abderrahmane.' (Ghanem family)

Mohamed says his son also met with CSIS and RCMP agents in Algeria around the time he was trying to renew his Canadian passport. His passport was not renewed. That forced him, his lawyer says, to travel with an Algerian passport.

"My son never hide himself. He was always in touch with CSIS when he was in Egypt. They have his number. They have his address," Mohamed said. "As a family we think we are being punished for something we have never done."

Caroline said, "He has become sort of the intelligence agency's whipping boy for all the ones who got away. He is being punished for being the guy who didn't go to Syria."