A teenager handed a life sentenced after the “gratuitous and senseless” murder of 15 year-old Alan Cartwright was already on bail on suspicion of possessing a knife.

Joshua Williams, 18, who was sentenced to a minimum of 21 years behind bars, had yet to be charged on suspicion of carrying a four-inch long lock blade, before he carried out the fatal attack in February.

A jury took just three hours on Thursday (17) to find Williams guilty of Alan’s murder and conspiracy to rob.

Jailing him, Judge Rebecca Poulet QC told Williams: “This was a gratuitous and senseless piece of violence. It was motivated by acquisitive greed and the incident has rightly horrified and dismayed the public.”

Alan was an innocent boy who was unconnected with gangs, she told the defendant.

“You have taken his life in a pathetic and unsuccessful attempt to steal a bike.”

She described Williams and his accomplices in the robbery, Shaquille Roberts, 18, and a 16 year-old, as “lying in wait” for a group like of young people just like Alan and his friends with the intention of stealing their bicycles.

While the other young men used force to take the bicycles, Williams swung with his left arm to deliver a “swift, but firm and fatal” stabbing to Alan’s upper chest, which penetrated three layers of clothing to pierce his lung.

Alan’s mother, who was eight months pregnant with her daughter at the time of the murder had told the court of her devastation and heartbreak at the death of her only son, in her victim’s statement.

Judge Poulet stated that she was satisfied that Williams had confessed to his parents, and had gone with them to the station to hand himself in, before changing his story – claiming to have an alibi that would place him elsewhere at the time of the attack.

“Much of the good that would have flowed from your courage (…) has now been dissipated,” she said.

Williams did not address the court and spoke only to confirm his name.