A man caused a huge explosion after transforming his girlfriend’s flat into a drug lab.

A bid by Scott Peden to make a super-strength form of cannabis called “shatter” turned catastrophic in March.

He wrecked the tenement in Glasgow’s Tollcross leaving a £1million repair bill.

Terrified neighbours had to be rescued from the inferno – with medics initially fearing two residents would not survive.

Peden sparked the chaos two weeks after getting bail – awaiting trial for a cannabis offence.

Read more: Takeaway driver attacked and car petrol bombed in Glasgow

The 30-year-old is now behind bars after he pleaded guilty to culpable and reckless conduct and producing a controlled drug.

Peden looked on the verge of tears as he was remanded pending sentencing next month.

The High Court in Glasgow heard how he had set-up a sophisticated “shatter lab” at the ground floor flat.

Prosecutor Iain McSporran said this involved the use of “laboratory-grade equipment” such as tubes, butane gas and a specialist “vacuum oven”.

Peden was attempting to produce “shatter” – the street name for Butane Honey Oil, which is a concentrated form of cannabis.

But, on March 21, the drug making had disastrous consequences as a dangerous gas ignited, causing a huge bang.

Windows and the front door were instantly blown off due to the power of the blast.

As the fire quickly spread, Peden and two friends managed to get out and flee the scene.

Neighbours fearing for the lives also tried to escape.

Ewa Uscitowicz and Robert Andrezjewski were knocked unconscious as smoke engulfed the building.

Read more: Takeaway driver attacked and car petrol bombed in Glasgow

Alexander Elder climbed out his second-floor window ending up badly hurt.

Firefighters arrived after a flood of 999 calls and rescued those still trapped.

It took about two hours to put out the flames.

A total of eight residents needed hospital treatment including for burns, smoke inhalation and carbon monoxide poisoning.

It was feared Mr Andrezjewski and Miss Uscitowicz may die.

Mr Elder meantime suffered broken bones from his fall. A cat and a dog were also killed.

The court heard Peden’s two friends were also badly burned.

Peden could not initially be traced after he fled and it was only on March 31 that he handed himself into police.

He admitted being in the kitchen at the time of the blast, but said it was an “accident”.

Read more: Takeaway driver attacked and car petrol bombed in Glasgow

Peden – who also had minor burns – added his girlfriend had not been at the flat for around two months.

Mr McSporran said: “Whether crude or sophisticated, this case illustrates the manifest danger created by such operations.”

Judge Lord Armstrong told Peden: “This is very serious reckless conduct, which impacted on a number of other people.”

Sentencing was deferred for reports.