Spanish police have seized 52 tonnes of hashish, a European record, and arrested three people as part of an investigation into a drug trafficking ring.

The drugs were found at an industrial warehouse in the southern city of Cordoba, stored in 1,700 individual packages which each weighed about 30kg, police said in a statement.

"This is the largest seizure of the drug ever carried out in Spain and a record also in Europe after police found 36 tonnes of hashish in a Panamanian-flagged ship in the port of Marin in northwestern Spain in 1996," the statement said.

The three arrests were carried out in Seville and Huelva in the southern region of Andalusia.

Over 30 police officers took part in the operation - which was launched after a man who went to the warehouse to return a forklift which he had rented was bound and gagged by armed men who were carrying out a search of the premises.

The man managed to escape and called police who searched the warehouse and uncovered the hashish hidden inside large boxes made of wood and cardboard.

Spain's close ties with its former colonies in Latin America, a major cocaine-producing region, and its proximity to Morocco, a major hashish producer, have made it a key entry point for drugs bound for Europe.

Spain seized 20.7 tonnes of cocaine last year, 24.9% more than in the previous year and 325.5 tonnes of hashish, down 8.5% from 2011, Interior Minister Jorge Fernandez-Diaz said last month.

That represents 41.21% of the total amount of cocaine which was seized in Europe last year and 73.69% of the hashish, according to the minister.