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.

Read More