The teenager was still having his asylum application processed when he was accused of planting a home made bomb on a District Line carriage during the rush-hour on September 15 last year.
The Old Bailey was told Hassan assembled the potentially deadly device using materials he bought on Amazon.
After planting the bomb, the jury was told the suspect then "calmly" got off the train further down the line and boarded a bus that followed the route of the Tube towards Parsons Green station.
Hassan sat on the top deck of the 74 bus towards Earl's Court. Jurors were told they might want to consider whether he did this in order to see what unfolded.
Prosecutor Alison Morgan said: "You will see all of the footage from this journey in due course... you will want to consider whether it appears that the defendant was looking out to see what might be happening to his right."
In the event, the device only partially exploded, sending a fireball along the carriage, causing commuters to flee in "fear and panic".
Morgan told jurors: "There were approximately 93 people in the carriage when the device detonated. The partial explosion created a large fireball.
"Some in the carriage were caught by the flames and sustained significant burns.
"Many ran in fear and panic. They were fortunate. Had the device fully detonated, it is inevitable that serious injury and significant damage would have been caused within the carriage. Those in close proximity to the device may well have been killed."
Jurors were shown CCTV footage of the explosion. It showed a fireball engulfing the carriage, as people ducked from the flames.
The court heard how hundreds of people tried to get down the narrow staircase and out of the station following the explosion.
But Hassan had got off the carriage at Putney Bridge Station before the bomb went off on a timer, the court heard.
Morgan said the device was made from the volatile chemical explosive TATP and contained a large amount of shrapnel to cause "maximum harm and carnage".
The 2.2kg of sockets, screws, bolts, nails, knives and screwdrivers had been put inside a white bucket, and an improvised initiator and explosives placed inside a Lidl bag.
The court was shown images and graphics of the device and how this was constructed. This included:
- A white plastic bucket with a Lidl plastic bag inside it, covered with a dark fabric and a pair of trousers.
- A tupperware container with a lid, covered in foil, at the bottom of the bucket. This contained around 300g of the volatile explosive triacetone triperoxide - TATP.
- A blue glass vase containing approximately 100g of TATP.
- Around 2.2kg of shrapnel made up of sockets, screws, bolts, nails, knives and screwdrivers which were in the bucket, but not in the container.
- Hassan arrived in Britain in the back of a lorry via the Channel Tunnel in October 2015. He had no identity documents and claimed asylum, saying he was born in June 1999.
Hassan, of Sunbury, Surrey, denies attempted murder and using the chemical compound TATP to cause an explosion that was likely to endanger life on September 15 last year.