Police and customs officers found the cocaine on Monday in the Mediterranean port of Valencia, Spain's second busiest port, a government tax office spokesman said on Thursday.
There were 300 bricks of high quality cocaine in the container and each had a label with the word "éxito" ("success") on it, he added.
Spanish authorities were trying to figure out the origin of the cocaine, which arrived on September 26 on a boat that departed Puerto Moin just east of San Jose, the capital of Costa Rica.
Spain's close ties with its former colonies in Latin America have made it the main entry point used by drug smugglers to bring cocaine to Europe.
The record amount of cocaine seized in a single year in Spain was set in 2005, when authorities confiscated just under 50 tonnes of the drug.