A Briton is among three people detained as part of an international drug trafficking ring operating from Catalonia.
Spanish police say they have dismantled the hashish smuggling operation and seized nearly 3.2 tons of the marijuana derivative.
Two Spaniards and one Briton have been accused of using industrial warehouses that had been repossessed by banks to grow the plants.
Police suspect the group stole around £380,000 worth of electricity to do so indoors.
It is alleged they then shipped the hashish in trucks to other European countries hidden among pallets of fruits and vegetables.
Authorities were alerted after receiving a tip that a warehouse in Llinars del Valles in the Spanish region of Catalonia was possibly being used to grow marijuana.
Upon searching the building, they found a “big and very sophisticated hydroponic plantation of marijuana”.
The three suspects have been charged with drug trafficking, drug manufacturing and electricity theft.
The abandoned warehouses used by the group are in the hands of several banks, a common scenario in the country since the building boom of 2008.
Lenders sometimes disable elevators and tear out stairwells in their apartment blocks to prevent entire buildings from being occupied by illegal squatters.