The boat, flying under a Dutch flag, was at serious risk of sinking due to the size of its cargo, the ministry said.
It was intercepted on Saturday 92 kilometres (57 miles) southwest of Almeria.
Photo: Agencia Tributaria
“The drugs took up all the available space” aboard, including on the cabins' beds and floors, the ministry statement said.
The three Dutch crew members, two men and a woman, have been charged with smuggling and endangering public health.
Spain is one of the main routes for Moroccan hashish and cocaine from Latin America to enter Europe.
In July, Spanish police seized 15.7 tonnes of hashish resin on a merchant ship near the southern port of Malaga.
The biggest such seizure was in 2013, when 52 tonnes of cannabis were discovered.