A Canadian man killed by Bangladesh police on Saturday for his suspected role in plotting a deadly terrorist attack at a Dhaka café was linked to a cluster of radicals from Calgary who are collectively responsible for more than 70 deaths overseas.

Bangladeshi officials believe Tamim Chowdhury, 30, was the architect behind last month's attack that killed 24 in the name of the Islamic State movement. Gunmen stormed a popular bakery, taking hostages, separating out those who identified as Muslim from the rest and executing a number of patrons for being foreign non-Muslims.

A University of Toronto student, Tahmid Hasib Khan, was at the bakery during the terror attack and is still being detained by Bangladeshi authorities. He has not yet been charged and the Canadian government is in contact with its Bangladeshi counterpart, but says it is limited in what it can do for non-citizens. His family has maintained his innocence.

Story continues below advertisement

While it is known that Mr. Chowdhury, a Canadian-Bangladeshi citizen, returned to Bangladesh three years ago, little has been made public about his connection to other radicalized individuals inside of Canada.

Related: Detained University of Toronto student formally arrested in Dhaka

The Globe and Mail has learned he spent time with what's known as the "Calgary cluster," which has been responsible for at least two large terror attacks. An imam who confirmed the connection and has been working actively to combat radicalization in Calgary says the federal government must focus resources on supporting community leaders and grassroots initiatives as it prepares to launch a new deradicalization initiative.

"Always have a counternarrative," said Imam Navaid Aziz, discussing the steps that can be taken to blunt the formative period of an extremist. "[Having] people that are willing to engage and debate with them is very, very important."

Almost a decade ago, Mr. Chowdhury lived in Windsor, Ont., where he attended high school and university, visiting Bangladesh only a handful of times in his youth. In 2009, he enrolled in a two-week-long extracurricular Islamic class taught by Mr. Aziz at the University of Windsor.

"I got to know Tamim quite well," said Mr. Aziz, noting Mr. Chowdhury was a good student and showed no signs of extremism. He never imagined him one day becoming the subject of a international manhunt as a leader of a terrorist group.

"He did not seem the leadership type of person … He would always prefer the back seat as opposed to the front one."

Story continues below advertisement

In 2012, Mr. Aziz moved west, taking a job at the Islamic Information Society of Calgary. After leading his first Friday sermon, he was surprised to see Mr. Chowdhury, who had also moved to Alberta to work for an oil or engineering firm. Mr Chowdhury, who pretended not to know the imam, was beside Damian Clairmont, a convert to Islam who would later gain notoriety as a Canadian terrorist killed overseas, said Mr. Aziz.

Both Mr. Chowdhury and Mr. Clairmont were part of a study group at the 8th and 8th Musalla, a prayer room in downtown Calgary frequented by at least six Canadians who have fought for extremist groups. Another member, Salman Ashrafi, would go on to become a suicide bomber, killing 46 in Iraq. In a televised interview from Syria in 2014, Farah Mohamed Shirdon described himself as an Islamic State fighter and warned U.S. President Barack Obama that his group would plant the black flag of the group on the grounds of the White House. He then threw his Canadian passport into a fire. Other alleged members of the Calgary cluster include two brothers, Collin and Gregory Gordon, both killed in 2014 while fighting for the Islamic State.

Mr. Aziz was sent to lead 8th and 8th in 2013 in a bid to counter the radicalization, but says it was too late. Most of the young men had already left for Syria and Iraq.

"This whole radicalization process started much, much earlier with these guys," said Mr. Aziz, who works with police and is a member of ReDirect, a community-based program meant to counter extremist literature. "In 2011, they're already reading material that is very very dangerous. We're catching on to this in September, 2013, we're literally two years too late now."

Mr. Aziz's recollections about Mr. Chowdhury being in Calgary align with the views of Amarnath Amarasingam, a professor at the University of Waterloo who specializes in radicalization and terrorism. He believes Mr Chowdhury may have also written a series of 2014 blog posts using the name Abu Dujana al-Muhajir. The blog eulogizes Mr. Clairmont and Mr. Ashrafi after they were killed fighting in the Middle East.

"Salman Ashrafi was not the first Canadian brother to perform a martyrdom operation and he surely will not be the last one either by the will of Allah," says a post from the blog.

Story continues below advertisement

The death of Mr. Chowdhury as an alleged senior terrorist comes just two weeks after the RCMP shot and killed a suspected would-be suicide bomber in Strathroy, Ont. Aaron Driver, whose radicalization appears to have occurred largely online, is not known to have spent any time with the Calgary cluster.

In coming days, the Liberal government is poised to announce a new office on deradicalization, increasing the millions Canada spends on programs to deter radicalization. On the campaign trail last year, the Liberals said they would hire a "community outreach and counter-radicalization co-ordinator" because law and order approaches to terrorism do not get to the root of the problem.

"I get the impression the focus is going to be overwhelmingly on kids in their basements online," said Mr. Amarasingham. "But I think the face-to-face relationships and the peer pressure groups [are] the key factors." By his estimation, there are more than 90 Canadians currently abroad fighting for groups such as the Islamic State and the al-Qaeda-linked Jabat al-Nusra.

Christianne Boudreau, Mr. Clairmont's mother, says more needs to done to work with families and the community, rather than detaining individuals suspected of radicalizing, which she fears only speeds up the process. She has been critical of the government, arguing they failed to intervene in the case of her son. "[Canadian authorities] watched him for almost two years. They knew. They didn't do a thing."

Mr. Aziz, who has witnessed several Canadian suspects self-radicalize during his time in Calgary, says from the perspective of prayer leader, things can happen rapidly and uncontrollably if a cluster forms. For example, he says he had been counselling Mr. Shirdon, a youth caught up with petty crime, and thought he was making progress, but things changed quickly when the imam left on a trip for three weeks.

"I had no communication with him during that time, but when I came back, he was completely changed, talking about jihad [holy war] talking about the establishment of khilafa [caliphate] …" he said. "We had two or three heated debates and then he just parted ways and I didn't see him again."

Story continues below advertisement

Ottawa has also taken steps to publicly separate the Islamic State from its self-proclaimed Islamic roots. "This group is neither Islamic nor a state, and so will be referred to as Daesh (its Arabic acronym)," said Minister of Public Safety Ralph Goodale in the preamble to a federal report on terrorism last week. In Arabic, the name has a pejorative connotation – to trample or crush – prompting a number of leaders to begin using it.

"When [terror attacks] happen, the Muslim community grieves twice. One, people are dying. They're innocent– they don't deserve to die, said Mr. Aziz. " And number two, it happens in the name of Islam."

Editor's Note: An earlier version of this article said Aaron Driver was shot and killed by the RCMP in London, Ont. He was actually killed in Strathroy, Ont. This version has been corrected.