Police intercepted the 20-metre (65-foot) submarine — thought to be the first of its kind captured in Europe — off the northwestern region of Galicia on Saturday.
They were only able to determine the amount of drugs inside after they managed to refloat the vessel three days later and tow it to a nearby port.
They found 152 bundles containing three tonnes of cocaine, Spanish police said in a statement.
While traffickers, especially from Colombia, have been caught using submarines to transport cocaine into Mexico and the United States, police said Saturday's seizure was “the first time that this system of transporting drugs has been detected in Europe”.
“This is a historic operation, which will mark a before and after,” government official Javier Losada de Azpiazu told reporters, confirming the drugs had a street value of 100 million euros.
¿Aun no has visto el submarino interceptado con 3000 kg de cocaína en una operación conjunta de Policía, Vigilancia Aduanera y Guardia Civil?. Es la primera vez que se interviene uno en #Europa#JuntosATuServiciohttps://t.co/MhdNkL3Hzt pic.twitter.com/tHzd7BrL8t
— Guardia Civil ?? (@guardiacivil) November 27, 2019
A source close to the investigation had previously told AFP that the submarine came from South America but Losada de Azpiazu said police were still working to determine its exact origin.
A total of 240 agents took part in the operation, which was carried out in cooperation with police from Britain, Brazil, Portugal and the United States, he added.
Spanish police said they launched their investigation after receiving a tip that a “suspicious vessel” was headed to Spain “loaded with cocaine”.
The information came from the Lisbon-based Maritime Analysis and Operations Centre (MAOC), an international agency set up by several European Union states to coordinate anti-drug trafficking actions.
Spanish authorities said the submarine had the capacity to transport up to five tonnes of cocaine.
Drug gangs began making frequent use of submarines to smuggle narcotics in 2005, said cartel expert Robert J Bunker of the US Army War College in Pennsylvania.
The vessels are usually built in remote river inlets in the jungles of Colombia, Ecuador and Guyana for around a million dollars “but can run into a few million dollars for larger or more sophisticated vessels”, he told AFP.
“If this submarine did have its origins in say Colombia or Guyana it would be considered a 'holy grail' voyage,” he said.
“It would represent the first such direct narco submarine voyage to Europe from South America ever identified.”
Two Ecuadorans were detained as they tried to escape from the submarine when police moved in. A third person is still on the run.
“The best candidates to man such submarines would be fishermen with the ability to navigate in the open sea and be able to fix the onboard engines and other vessel systems if they should break down,” said Bunker.
“Such individuals also need to psychologically handle claustrophobic and squalid conditions for extended periods of time.”
A thousand narco-subs
Bunker estimates that drug cartels have to date built around 1,000 so-called narco submarines.
Most are only semi-submersible — a ship partially submerged that cannot fully dive like a submarine.
In September the US Coast Guard and Colombian navy intercepted a submarine carrying over five tonnes of cocaine off South America.
Galicia's rugged Atlantic coast with hundreds of hidden coves, inlets and desolate beaches has for years been the gateway for illegal drugs into Spain and Europe.
In the 1980s, a group of Galician women brought the problem of drug smuggling in the region to national attention by protesting outside drug barons' homes.
Spain accounted for the second-highest proportion of cocaine seizures in the European Union last year after Belgium, with 41 tonnes apprehended.
The first transatlantic narco sub but not the first in Galician waters
In fact Spanish drug smugglers had attempted to import drugs using such vessels into the Galicia region before.
In 2006, a gang of traffickers attempted to use a homemade semi-submersible to bring in a drugs cargo undetected into shore from a yacht moored out in the high seas.
But the venture failed and the vessel washed up in the Vigo estuary in August of that year, and those behind it were arrested, tried and sent to jail.
The homemade vessel was captured by police in the Vigo estuary in August 2006. Photo: Guardia Civil/Ministerio Interior