Damon Smith caused major security scare after leaving device on Jubilee Line train last year.

Damon Smith was aged 19 when he allegedly left a homemade bomb on a London Tube trainFacebook

A student with a keen interest in Islam and weapons wanted to cause carnage in the capital when he planted a homemade bomb on the London Underground, a court has heard.

Damon Smith, 20, allegedly packed a rucksack with explosives and ball-bearing shrapnel attached to a £2 Tesco clock before leaving the device on a Jubilee Line train in October 2016.

It caused a major security scare and the prosecution said had the device functioned properly it would have exploded just as passengers were being ordered off the platform at North Greenwich station.

Smith is on trial at the Old Bailey where he denies a charge of possession of an explosive substance with intent. He has admitted the lesser offence of perpetrating a bomb hoax.

The defendant, who has Asperger syndrome, said the device was intended to work as a smoke bomb and had been left as a prank similar to ones he had seen on YouTube.

But prosecutor Jonathan Rees QC told the court at the opening of the trial on Wednesday (26 April) that Smith had intended to build a real bomb "which he intended would explode and endanger the lives of those travelling on the tube train or, at the very least, cause serious damage to the train itself".

Rees said that, in interviews following his arrest, the defendant claimed to have included the ball bearings to "convince people that it was a real bomb". "However, the ball bearings were located in the sealed flask and so were not visible to anyone who looked into the rucksack... we suggest that the defendant's explanation for why the ball bearings were included in the device simply doesn't add up and."

Rees told of how Smith grew up in Newton Abbot in Devon and moved to London with his mother in June last year before starting a computing course at London Metropolitan University.

He had developed an interest in Islam, guns and gambling, and collected pictures of extremists including the alleged mastermind of the 2015 Paris terror attacks, jurors were told.

Rees said the teenager, who was carrying a copy of the Quran when he was arrested, had been raised a Christian but had told officers he thought Islam was "more true".

He allegedly said "he did not hold extremist views and did not agree with extremism, such as the beheadings that were occurring in Syria: they were not Islamic, they were bad... he didn't want to be a terrorist, what he did was a prank."

The prosecution said Smith got off a train at London Bridge station shortly before 11am on 20 October last year, leaving behind a rucksack containing the bomb.

Some of the passengers in the carriage at the time spotted the bag and reported it when they got to Canary Wharf. The train driver took the bag, thinking it was lost property and carried on towards North Greenwich, Rees said.

It was while he was en route to the next stop that he noticed wire poking out of a clock, the court heard. He raised the alarm and the train and North Greenwich station were evacuated. The device was set to go off at about 11.02am.

Smith, meanwhile, attended a lecture at his university campus and searched for news articles about the incident when he got home later, the court heard. He was arrested the next day.

Before the Tube incident Smith printed off an al Qaida article entitled "Make a bomb in the kitchen of your Mom", the court heard.

A shopping list for "pressure cooker bomb materials" was also allegedly found on an iPad ending in a note to "keep this a secret between me and Allah #InspireTheBelievers".

He had saved photos of Abdelhamid Abaaoud, the Belgian-born jihadi who is believed to have masterminded the November 2015 Paris attacks, Rees told the jury.

A search of Smith's home in Rotherhithe, south London, uncovered a blank-firing self-loading pistol, a BB gun – both bought legally – as well as a knuckleduster and a knife.