The teen who came to Canada with his family from Pakistan in the mid-1990s played on the high school cricket team and took part in the school's multicultural society before heading off to university.
Somewhere along the way, though, things changed for Khalid, who now sits in an eastern Ontario maximum-security prison, serving a 20-year sentence for his part in the so-called Toronto 18 plot to bomb high-profile targets in the city's downtown.
Khalid is one of a small number of Canadians who have been accused or identified as having ties with extremist activities at home and overseas.
In a series of exclusive letters Khalid exchanged with CBC News over a six-month period, the 27-year-old offers his own analysis of his transformation from that typical teenager to a young radical now convicted on a terrorism-related charge.
In doing so, he laid out a trajectory that is similar to how one expert on so-called homegrown terrorism sees individuals become motivated to embrace extremist views.
'Things were looking good'
As Khalid tells it, religion started to become a bigger part of his life in high school.
"It gave me focus and the ability to be more responsible towards my family."
He began leading Friday prayers at Meadowvale High School in Mississauga, but he says they were not laced with jihadi rhetoric or martyrdom exhortation.
He was accepted at University of Toronto in Mississauga and "things were looking good." But at some point in his first term in the fall of 2005, he discovered a series of online lectures by the fiery American-born al-Qaeda cleric Anwaral-Awlaki (who was killed in a U.S. drone strike in Yemen in 2011).
"He had a knack for telling a good story, so when I came across his lectures on jihad, I was hooked," Khalid writes.
"Here was someone I respected and he was connecting global grievances that Muslims share with what your responsibility is in terms of these issues.
"I was left with the understanding that it was religiously incumbent on me to assist in defending Muslims whose land had been invaded."
Khalid insists that he didn't hate Canada or Canadians.
"It was Canadian foreign policy specifically in Afghanistan," he writes. "My rationale was that if I were to go over to Afghanistan to fight, I would be just one more person, while in Canada I could make a bigger difference. I would be more useful to the 'cause' this way. I couldn't step away now."
Khalid says he did not realize that he was being radicalized, and that he did not begin to hate non-Muslims.
'Quest for a change'
"My quest for a change ended up with me meeting with my co-accused, and we ended up planning what we were planning."
What they were planning, according to court records, was detonating bombs outside the Toronto Stock Exchange and the headquarters of the Canadian spy agency, CSIS.
Khalid was arrested in 2006 while unloading what he believed was at least two tonnes of ammonium nitrate.
Three years later, he pleaded guilty to one charge of participating in a militant plot with the intention of causing an explosion. He was sentenced to 14 years in prison and credited with seven years for time already served. The Ontario Court of Appeal later increased the sentence to 20 years.
His story in many ways offers parallels with how Lorne Dawson, a professor and chair of the sociology and legal studies department at the University of Waterloo, describes the concept of homegrown terrorism and how individuals are motivated to choose that path.
"These are young people who are mainly men. They are remarkably ordinary," Dawson says.
"They're pretty much like most other young people. If we're going to explain why someone would become a terrorist, particularly a homegrown terrorist, the process of radicalization, then you've got to look at individual motivations.
"With each layer of explanation, you're reducing the pool of potential candidates for who could become a terrorist. So it's like a funnel."
Caught between cultures
Dawson points to several factors in the radicalization process, ranging from how globalization of the internet enables radicalization everywhere to how immigrant children can be more likely to embrace extremist views.
"They wanted to be a good child to their family and their parents, but they couldn't buy the traditional cultural values and mores and practices of their parents because they weren't living in Morocco. They weren't living in Saudi Arabia anymore or Pakistan. They're living in a modern urban Western context. They're kind of neither one nor the other."
Other potential factors along the path to radicalization include an individual's quest for significance and a willingness to take risks.
A charismatic leader can also be influential at key points. There can often be an event in a person's life that can lead to a final decision to participate in an extreme action.
Triggering life event
"In most cases, there will be a precipitating factor," says Dawson. "A person's mother may die and they have a very strong attachment to their mother, their relationship may crumble … they may lose their job, lose their career, something that they had been relying on to provide stability or certainty in their world goes away."
Khalid's mother died suddenly when he was in high school. He says he did not turn to religion because of his mother's death.
Though he does point to a "little bit of a falling out" he had with friends before he began hanging out with a younger group of Pakistanis, which ultimately piqued his interest in learning more about Islam.
In an email, his sister, Fatima Khalid, confirmed that her brother was not home when their mother was discovered not breathing in the bathtub, but came home while emergency medical workers were trying to revive her.
She died two days later in hospital, and Fatima says there's no doubt that "experiencing such a traumatic death of a parent will have a strong emotional impact on an individual."
He has apologized to Canadian Muslims and Canadians in general for what he did, and has spent time in counselling with an imam during his time in prison.
"When we did talk about questions I had, he essentially challenged me and my arguments," Khalid writes. "When I didn’t have any answers for him, that is when I really began to analyze my actions and thinking. He provided me with material that argued against the legality of terrorism."
Khalid now says he knows his actions weren't right.
"There will probably always be someone who will be allured by the extremist narrative. It took me a long time to be convinced that I was wrong."