Security camera video of Ahmed Hassan at the Wimbledon tube station before the bomb was detonated on a train near Parsons Green on September 15, 2017.
London CNN  — 

A teenager was convicted of attempted murder Friday in a UK court for detonating a homemade bomb on a packed Underground commuter train in London last year.

Ahmed Hassan, 18, left the device in a subway carriage with 93 passengers on board on the morning of September 15. It partially exploded at Parsons Green station in west London, injuring 30 people. Hassan, who had gotten off the train at the previous stop, was uninjured.

A police photo of  Ahmed Hassan.

A jury at the Old Bailey court in London heard how the combination of chemicals he used to make the device was extremely dangerous, with even a gram having the potential to cause serious injury and damage on detonation, according to a statement from the Crown Prosecution Service (CPS).

By the morning of the attack, Hassan had made at least 400 grams (about 14 ounces) of the explosive at his home in Sunbury, west London, the court heard. He also packed the device, which was operated by a timer, with more than 4 pounds of metal shrapnel in order to cause as much injury as possible.

Police forensics officers work near a train at the Parsons Green stationon September 15, 2017, after an explosion on board.

When it exploded, witnesses described hearing a loud bang and seeing a fireball roll across the carriage ceiling, the CPS said.

Hassan was arrested in the southern port town of Dover the following day in connection with the attack.

“The prosecution argued that Ahmed Hassan made this homemade bomb with the aim of indiscriminately killing as many people as possible. The jury has agreed,” said Sue Hemming from the CPS. “It was only a matter of luck that the device did not work as he intended or it could easily have led to the loss of innocent lives.”

CNN’s Lindsay Isaac contributed to this report.