Police and customs officials found 5.88 tonnes of cocaine on November 28th in a container supposedly transporting bananas which arrived in the southern port of Algeciras from Medellin in Colombia, it said.
Police arrested a Spaniard who headed the import department of the company using the container, and two alleged accomplices, a Honduran and a Portuguese national. Two other people are under investigation.
The seizure is "one of Europe's biggest" and the second largest of cocaine ever carried out by Spanish authorities, the statement said. The country's biggest was a haul of 7.6 tonnes, made on the high seas in 1999.
The cocaine, divided into one kilo (2.2-pound) blocks, bore "the usual marks used by drug traffickers to identify shipments to different destinations and organisations," the ministry said.
The container was due to be delivered to El Prat de Llobregat, a municipality just south of Barcelona that is home to the Catalan capital's airport, Spain's second busiest.
Spain's close ties with its former colonies in Latin America, a major cocaine-producing region, have made it a key entry point for the drug into Europe.