A boarding school pupil who caused £40 million of damage to the economy by throwing petrol bombs on to a motorway has been detained in a psychiatric hospital.

Nicholas Elger, 17, made the improvised bombs with ingredients he had shoplifted from Tesco before dropping them onto the M3 from a footbridge because he 'wanted to kill someone'.

A judge heard how the 17-year-old admitted to creating and using the home-made petrol bombs as well as trying to blackmail Winchester College where he was a boarder.

Nicholas Elger, 17, has admitted to throwing home-made bombs onto the M3 because 'he wanted to kill someone'

Elger also stole computers from his prestigious school and confessed to burgling the premises eight times.

Judge Keith Cutler, sitting at Winchester Crown Court, ordered that Elger should be publicly named despite being a juvenile because he had 'a duty to protect the public.'

The 17-year-old was remanded into the care of a psychiatric hospital while further examinations are carried out.

Winchester College boarder Elger made the improvised bombs with ingredients he had shoplifted from Tesco before dropping them from a footbridge

He could now face a custodial sentence if any condition is considered to be untreatable.

In September last year Elger shoplifted items from a Tesco store and then used them to put together homemade explosive devices on consecutive weekends.

He shoplifted fabric conditioner, toilet cleaner, washing balls, batteries, duct tape, white spirit, rubber gloves, gardening gloves, baking trays, coke, vodka and bin liners.

He was caught on CCTV after buying bottled water that he used to transport the devices in.

The attacks took place on consecutive weekends in September and caused significant traffic delays on the motorway

He dropped the bombs from a footbridge crossing the M3 motorway near Junction 10.

The motorway was closed for more than 10 hours as a result of the petrol bombs.

Rob Welling, prosecuting, said that Elger confessed to carrying out the attacks and said that he had been hearing voices and 'was sort of trying to kill someone'.

He told Judge Cutler: 'As Elger was going to the bridge on both occasions he said he heard voices that wanted him to kill someone.

'While he was throwing the packages he was hearing voices telling him to do it. His intention was to kill, then he went back to his room to sleep.

'He does not regret his actions, but regrets not doing it properly and killing someone. He has shown no signs of remorse and there was a high degree of risk of death, economic loss to the area and the public anxiety of what may have been the motive.'

Elgar confessed to carrying out the attacks and said that he had been hearing voices, he has now been detained in a psychiatric hospital

Defending Elger, Robert Morris said: 'There is no escaping the seriousness of what has happened but two psychological reports have been uploaded by Dr Hill and Dr Taylor.

'On any view, Nicholas is a deeply troubled individual. He is placed at Bluebird House and is engaging with psychological help. Dr Hill suggests that Nicholas is suffering from a psychological illness or a possible personality disorder.

'He believes the psychological disorder is at the root of the explosive offences. Both [doctors] have been testing this voice in his head, and the violent fantasies. His alter-ego James has also been investigated.

'He has been expelled from school, lost his friends and has lost his chance of going to a top university. It appears there has been a fundamental shift in his character and intensive psychological inquiries are ongoing.'

Elger's attacks cost £40 million to the economy, as well as severe traffic delays as police investigated the home-made devices

Judge Cutler said while lifting reporting restrictions: 'In this particular case you are 18 in July and it seems to me there is substantial interest in knowing the facts of this and some of those tie in with this.

'Maintaining the order no longer applies, the public interest now outweighs that and matters may now be lifted.'

Going on to address the defendant, who was wearing a suit and tie with buttons undone and long hair swept to the side, the judge said: 'Whilst you are 17, it is clear to me you are a dangerous young man. I am very concerned for you and your thoughts, and what is in your mind.

'I have a duty to protect the public. Due to medical conditions I may be able to impose hospital orders, these may however not succeed.

'Whichever way it goes, you and I will meet in the coming months to see which way it goes in your case. Your thoughts are completely unacceptable, fortunately as it turned out no-one was hurt and for those reasons a hospital order is placed in your case.'

Judge Keith Cutler said that he was lifting the reporting restrictions on Elger because of the danger he posed to the public

A new hearing was set for Friday, May 18 where the court will be updated on Elger's medical condition and a custodial sentence may be enforced if the judge believes no progress has been made or if any condition is not treatable.

In the first bombing incident, Elger dropped a device off the bridge during the early hours of September 16.

A witness described how she saw the back of a lorry on fire for two or three minutes which she thought had been caused by a fuel problem.

Another witness described how he had to swerve to avoid two fireballs dropped from the bridge simulataneously on lanes two and three.

Some motorists were stranded for almost 10 hours following Elger's attack, with a few of them having to find novel ways of keeping themselves entertained

The second incident happened the weekend after, at the same location.

Elger had been dissatisfied with the outcome of the first attempt and modified the explosives.

This time, the device failed to hit a vehicle but a witness described how she was forced to stop and block lanes one and two as a fire leapt to the height of a person, on the motorway.

A lorry, which overtook in lane three, relit the fire minutes later.

Elger had reportedly been dissatisfied with the outcome of his first attack and so planned the second one for September 23, the weekend after his first

Emergency services and specialist investigators attended the scene and motorists were stranded for several hours as the crews carried out extensive searches and investigations.

The teenager previously attended the illustrious Winchester College boarding school before being expelled after he stole computers, iPads, Macbooks and DVD drives worth more than £70,000.

He sold them on eBay while also attempting to blackmail the school for Bitcoin worth £20,000 to stop the burglaries.

Elger also admitted to stealing from his prestigious boarding school and confessed to attempting to blackmail the school in order to stop the burglaries

Judge Cutler, at Winchester Crown Court today, heard that the schoolboy set up an untraceable email address that appeared to be foreign but was caught out by his handwriting on a previous letter he had sent to the school.

Prosecutor Mr Welling said that Elger's housemaster had been concerned by his behaviour which included adopting an alter ego called James and having a knife engraved with the name.

He also collected hundreds of matches and had drawn an 'eerie' picture on a notice board, the court heard.

Referring to the burglaries at the school, Mr Welling said: 'He described when interviewed that he did it for satisfaction and he found the risk enjoyable.'