Police yesterday revealed details of the largest-ever cannabis factory uncovered in Scotland.

In an unprecedented operation, an organised crime gang was alleged to be cultivating vast quantities of the drug with a street value of £1.2m.

The factory spanned a "maze" of rooms across three floors in a quiet street in Ayr and encompassed more than 3000 "high grade" plants in various stages of growth, from seedlings to plants ready for sale to lower level dealers.

The allegations came to light after a police officer on patrol noticed a pungent smell emanating from the building and decided to investigate.

Such was the scale of the set-up, it is believed it took up to six weeks to prepare the factory for cultivation purposes.

The hydroponic equipment and ventilation facilities used are alone believed to have been worth about £50,000. Police declined to say how long the factory had been in operation.

The crackdown on the factory came as part of Operation League, a Strathclyde Police drive on home-grown drugs which has already seen around 8000 cannabis plants, worth more than £4m, seized across Ayrshire, Lanarkshire, and Glasgow.

Chief Superintendent Hamish Cormack, Strathclyde Police's divisional commander for South Ayrshire, said yesterday: "This is the largest cannabis cultivation factory ever found in Scotland. The size of this factory and the equipment that was used is on a scale that is beyond comprehension. It was a very professional set-up which had bypassed the main electrical supply.

"We are looking at a very mendacious, seriously organised crime group who were distributing cannabis throughout the west of Scotland and far beyond."

He added: "This factory was found thanks to the diligence of one police officer and if he can detect unusual circumstances, we would ask any members of the public aware of something similar to contact the police."

Described by Chief Supt Cormack as a "maze" of rooms, three floors of a nest of buildings next to Ayr Academy were occupied.

In all, there were nine rooms allegedly used in the cultivation of the drug, some "warehouse sized," but all "much larger than the average living room". Those involved had taken over a disused furniture warehouse and pawn shop, and had knocked through a wall to make use of what was once a taxi firm's offices.

Police said two families living above the property were unaware of the operation but were said to be shocked to hear of the cannabis factory.

The buildings were leased from a local businessman who, police say, was unaware of the criminal motivations of his new tenants.

Such domestic factories are highly sophisticated and need large amounts of heat. This means that electrical systems in homes and other premises have often been bypassed to illuminate high-powered lamps.

Emergency services have called for the public's help in tackling the problem, as criminal activity in similar factories has already led to two fires.

A teenager appeared in court yesterday charged with cultivating cannabis. The 16-year-old, from Ayr, faces three charges of producing a drug, supplying drugs and possessing drugs with intent to supply.

He appeared at Ayr Sheriff Court in private where he made no plea or declaration. He was remanded in custody and will reappear in a week.