Neighbours called 999 when smoke began pouring from a terrace in Liscard Road, Wavertree, early on Sunday.

Firefighters were on the scene quickly to tackle the blaze and discovered the three-storey house was crammed full of cannabis plants.

The cause of the fire was said to be the overheating of the main electricity cable powering the growing systems and extraction fans.

The cable had been illegally tapped straight from the mains.

Police and fire chiefs today rounded on those behind the 800 plant factory, saying it was only the smoke alarms next door that stopped a potential tragedy.

Inspector Deborah MacKay, of Merseyside police, said: “Thankfully no one was injured or killed as a result of this fire but the outcome could have been very different.

“Thankfully in this case, the fire was discovered and quickly put out.

“Growing drugs in this way could cause a fatal fire and I would ask landlords in particular to be vigilant of any suspicious activity in their properties.”

Myles Platt, Merseyside Fire & Rescue Service Area Manager for Prevention and Protection, said: “The fire was caused by the overheating of the main incoming electric cable which was being used to illegally abstract electricity to feed various floors of the adjoining building where the cannabis was being cultivated.

“The electrics throughout the building were in a very unsafe condition. If it wasn't for the fact that residents in a neighbouring property had smoke detectors and were alerted to the fire, people's lives could have been seriously put at risk.”

Officers have spent the last two days dismantling the massive farm, which had plants in the loft and every room of the house.

The hunt is now on for the gang behind the drugs factory.

Insp MacKay added: “We will seek to bring offenders to justice by putting them behind bars and stop them from bringing misery to the lives of other residents.”

Anyone with any information should call Merseyside Police on 101 or Crimestoppers, anonymously, on 0800 555111.