Ali K stands in the foreground, his face framed by a white hood and trimmed goatee.

His three companions embrace. One smiles goofily. One holds up a middle finger. One is the Mayor of Toronto. The three are oblivious to the misfortune that will stalk them from this moment on.

But Ali K looks circumspect.

Story continues below advertisement

In the months after the photograph became public – the only visual evidence buttressing allegations of drug abuse against then-mayor Rob Ford – Ali K would turn those same intense eyes on journalists attending his court proceedings, telegraphing his rage with long, scorching stares. By then, he would have much to be angry about: his arm disabled by bullets, his friend shot dead, six criminal charges, a pall of shame hanging over his family, public notoriety.

But last week, no one but his parents and a single reporter bore witness as Ali K's role in that broader saga ended in a Toronto courtroom.

"I hurt myself, my family and a lot of other people," he told a judge during sentencing proceedings that ended after a three-and-a-half year entanglement with the criminal justice system. "I realize I brought it upon myself."

His sentencing on Sept. 23 could be seen as the final ripple emanating from a photograph that launched a thousand news stories and tainted a community with scandal. Ali K, who today goes by his full name, Mohammad Khattak, could anticipate none of this as he posed with the mayor that cold winter's night. The world knows how the late mayor's life changed after that photo, but what became of the young men who posed with him?

Blood-stained sidewalk

The photo's provenance is disputed. Mr. Khattak told police it was snapped in the winter of 2012. Others said it was taken in February, 2013, closer to the time Mr. Ford was captured on video smoking drugs in the house seen in the photo's background.

At the far left side of the frame stands Anthony Smith, Mr. Khattak's childhood friend and basketball teammate. Mr. Smith lived near the Dixon apartment towers along Dixon Road and Kipling Avenue in the Toronto community of Etobicoke. He was a standout basketball player with two years of college under his belt.

Story continues below advertisement

But police would come to believe that their schoolyard friendship had evolved into the pair's membership in a gang of drug dealers and gun-runners called the Dixon City Bloods, allegations a jury would later reject in the case of Mr. Khattak.

One evening in late March, 2013, the pair went downtown for Wild Wednesday at the Loki Lounge on King Street West. Inside the club, people lounged on velvet furniture, women teetered on high heels and men wore sunglasses. As Wild Wednesday blurred into Thursday morning, the friends spotted someone they recognized, Saaid Mohiadin. Mr. Smith had been accused of robbing Mr. Mohiadin the preceding November, according to police documents. They had unfinished business.

The friends texted Liban Siyad, a Dixon City Bloods member, to ask what they should do. Little did they know police had been investigating the Dixon City Bloods for close to nine months and their cellphones had been tapped. According to police, Mr. Smith and Mr. Khattak decided to wait outside the club for Mr. Mohiadin to emerge, so they could inflict a beating. Mr. Siyad had a different story. He would tell a friend that he had advised the two to leave the club to get away from potential trouble.

At 2:30 a.m., Mr. Smith and Mr. Khattak confronted Mr. Mohiadin and a second man, Nisar Hashimi, on the north side of King Street West. Without warning, gunshots rang out. One round entered the back of Mr. Smith's head. Two more hit Mr. Khattak in the back and neck.

By the following day, Mr. Smith was dead. He was 21.

Mr. Khattak would survive, but movement in one arm was severely restricted.

Story continues below advertisement

Their blood stained the sidewalk outside a Lee Valley Tools outlet for several days while downtown pedestrians walked by, unaware of the momentous sequence of events that had been jolted into motion.

Four days later, then Toronto Star reporter Robyn Doolittle's phone rang with a call from a man named Mohamed Farah. He said he had access to a video showing the mayor smoking crack cocaine. To buttress his claim, he showed Ms. Doolittle – now a Globe and Mail reporter – and her editors the photo of the three young men posing with Mr. Ford. How he obtained it was unclear. He explained that he was acting as a broker for the cameraman, who was shaken by Mr. Smith's murder and wanted $100,000 for the video so he could start a new life elsewhere.

Mr. Farah had made a similar offer to John Cook, editor of the New York-based website Gawker.com and arranged for him to see the video. Ms. Doolittle and another Star reporter viewed the video on May 3.

On May 16, both outlets would publish the photo, alongside stories detailing the video. On computer screens, smartphones, news pages and televisions around the world, the photo would be seen millions of times over. These young men had looked to crime as an antidote to poverty and alienation. Instead, they got international infamy.

Those original reports didn't mention the other two people in the photo, but sources soon identified Mr. Khattak. Reporters began showing up at the North York bungalow his father had purchased a few years earlier. His mother, Zainab, would tell them that her son remained too unwell to come out and speak.

The following month, a far more abrupt knock came at her door. Police forced it in and yelled at the family to lie on the floor. "I thought somebody had intruded, to kill my son," Zainab Khattak told a bail hearing.

Story continues below advertisement

Dozens of similar raids took place across the city on June 13 as part of Project Traveller, a year-long police investigation into the Dixon City Bloods, whom police called a violent gang of drug dealers and gun-runners. Despite his injuries, Mr. Khattak, then 19 years of age, was taken in on six charges, all related to trafficking cocaine and marijuana for a criminal organization. The police alleged he was a central player in the gang, a claim the jury would dismiss.

The majority of the 55 people charged in Project Traveller lived in the Dixon neighbourhood. The high-profile arrests cast a negative light on the neighbourhood and its residents.

"These kids were painted as gangsters," said Abdi Warsame, a community organizer in the Rexdale neighbourhood where the three young men in the photograph grew up. "But for this community, these were children of the community, someone's brother, someone's classmate. Gangsters don't live under their mothers' roofs. These kids did. They were not a bunch of thugs with no life."

A better place

The early court hearings for Project Traveller featured overflow rooms. Reporters, families of the accused and attorneys crowded in. At Mr. Khattak's bail proceeding, his mother identified the fourth and final subject of the photograph, Monir Kasim, a 20-year-old friend of Mr. Khattak's who had also been charged with participating in a criminal organization. He was a mop-haired kid with an easy smile who had yet to finish high school. His mother insisted he wasn't the man in the photo.

Judges granted both men bail within a month of their arrests. Quickly, their lives turned to tedium. Neither could leave home without a parent, nor could they have any contact with their co-accused. By fall, the reporters were gone, their attention focused more fully on Mr. Ford.

Story continues below advertisement

As has been well documented, Mr. Ford eventually admitted to smoking crack cocaine and abusing alcohol, but only after the Project Traveller investigation branched off into Project Brazen 2, a probe into the former mayor's suspected involvement in illicit drug activity.

Mr. Ford would continue to battle those demons while a rare form of cancer took root. Diagnosed with liposarcoma in September, 2014, he died in March, 2016, at the age of 46.

With two of the photo's subjects dead, two remained, their lives unquestionably altered.

Eager to get on with his life and avoid the kind of decade-plus sentences being doled out for more senior members of the Dixon City Bloods, Mr. Kasim pleaded guilty to two lesser marijuana and conspiracy charges. He received a suspended sentence and probation. His family did not respond to phone calls and his lawyer hasn't heard from the family recently.

The Khattaks, meanwhile, decided to fight the charges. Shortly after his arrest, Mr. Khattak was told repeatedly that the charges would be dropped if only he would identify the person who shot his friend Anthony Smith. He refused; his case dragged on. A jury eventually rejected the more serious charge that he'd dealt drugs on behalf of a criminal organization, which would have carried a greater sentence.

The only charges that remained involved six minor drug deals – some marijuana and 1.2 grams of cocaine – over nine days.

Story continues below advertisement

Even the Crown had to admit it was a paltry amount. Still, at a sentencing hearing last month, Crown Attorney Kerry Hughes recommended a 12-month sentence for Mr. Khattak. Nathan Gorham, Mr. Khattak's lawyer, argued that further imprisonment was unwarranted. He'd already logged 27 days in prison following his arrest, followed by three years of severe bail restrictions on his liberty.

Over that period of time, Mr. Khattak had proven his desire to become a good citizen. The shooting, the arrests and the long, painful slog through the courts have led him to a better place. He turned his efforts to school and earned an Ontario Scholar designation for scoring 80 per cent or better in six Grade 12 classes. Plus, he had no prior criminal record and came from a loving, supportive family. He had plans to attend university for business.

"Your honour, this whole experience … has been a huge eye-opener. … All I cared about was partying and drinking," he said during a sentencing hearing. "Before I was shot, I didn't think of going to university. … Now, I want to pursue postsecondary with the goal of a nice job … and inner peace."

On Sept. 23, Justice Campbell concurred with Mr. Gorham. He sentenced Mr. Khattak to time served and three years' probation. No more jail time. He wouldn't even have to forfeit $790 in cash that police seized at the time of his shooting.

Outside court, Mr. Khattak's parents, Pakistani immigrants, looked more exhausted than elated. They refused to speak for the record. The photo had thrust their son from urban anonymity to international headlines. They had put every spare moment and spare dollar toward his defence.

"This whole case and the attention it received at first caused an enormous amount of stress and anxiety for this family," Mr. Gorham said.

While Mr. Khattak's case is over, the photo lives on, said Mr. Warsame, the community worker. A stigma remains attached to the Dixon community.

"The photo gave the media and the rest of Toronto an opportunity to write their own violent narrative about the area," he said. "But many families here paid a steep price too. … The whole community would be in a far better place if Rob Ford had never shown his face around here."