A 24-year-old from Calgary, who had been locked up alongside Taliban fighters in a Kabul prison, was deported to Canada last month, officials have confirmed.

Sohail Qureshi, who at first was believed by authorities to be involved in plotting a suicide bombing in their capital, was being held on immigration charges at the Policharki prison on the outskirts of Kabul.

Afghan authorities deported Qureshi on October 9, Foreign Affairs spokesperson France Bureau confirmed to CTV.

Consular officials provided support and assistance to facilitate his return to Canada, the spokesperson added.

Foreign Affairs would not release additional details regarding this case under the Privacy Act.

Qureshi was arrested last May by Afghan police on a road often used by NATO forces. Authorities claimed he was acting suspicious.

However, unlike similar arrests where suicide bombers were found with explosive vests, Qureshi had nothing on him.

In the months after his arrest, Afghan Intelligence Chief Abbasi admitted that investigators had little evidence.

"We couldn't find any hard evidence he is a terrorist. Or that he was working with al Qaeda," Abbasi told CTV News.

Abbasi added that Qureshi arrived in Afghanistan without a visa so he was charged with an immigration crime.

Abbasi blamed police for botching the investigation.

"It was the police, not intelligence agents who arrested him. They should have followed him and gathered more evidence first," he said.

CTV's Steve Chao managed to meet recently with Qureshi, a computer science grad of Pakistani origin, but was given a curt "no" when he asked him to answer a few questions.

When approached a few months back by a journalist from Macleans magazine, Qureshi said he didn't talk to reporters because "the media twists everything."

Qureshi has denied the terrorist allegations.

Timeline

Using his Canadian passport, Qureshi obtained a Pakistan visa and travelled there some time in February.

In a written statement to police, Qureshi claimed to have then slipped into Afghanistan twice -- first in March and then again in May, when he was arrested.

In one written statement, Qureshi claimed he was only there to land a job with NATO troops.

However, in another written statement, Qureshi claimed he was in Afghanistan for a "vacation" and denied being a suicide bomber.

The statements contradict an initial statement released by Afghan authorities earlier this year, in which the Canadian seemingly admitted to being a bomber.

"(Afghan authorities) say in the written statement that the Canadian has admitted to planning to carry out a suicide bomb attack in the city," Chao reported last May.

The statement went on to say that he confessed that his brother was the suicide bomber behind a Sept. 30 attack last year in Kabul that happened in the main gate of the government office.

This was one of the more spectacular or massive bomb attacks in Kabul in recent years. It killed as many as 12 people and injured more than 42. In Ottawa, a Foreign Affairs spokesman at that time said he couldn't confirm whether any Canadian had been involved in the 2006 Kabul bombing, adding he was "not aware of this."

In some reports at the time, the Canadian was identified as Qureshi. Foreign Affairs still would not identify the man as Qureshi, but told CTV.ca that consular officials visited the individual several times.

Based on a report from CTV's Steve Chao in Afghanistan