In a joint operation, the Guardia Civil and the National Police smashed “the main international criminal organisation behind the production and supply of most of the synthetic drugs in Spain”, they said in a joint statement.
Synthetic drugs are manufactured using man-made chemicals rather than natural ingredients.
Eleven people were arrested on charges of drug trafficking and belonging to a criminal organisation, including the organisation's Dutch boss.
As well as the ecstasy tabs, police also seized 76 kilos (167 pounds) of speed, 39.5 kilos of crystal meth and 217 litres of liquid amphetamine with which they could have produced 738.5 kilos of speed.
They also impounded almost 400 kilos of hashish and marijuana which they were to have exported to The Netherlands to pay for the purchase of the necessary substances to manufacture the drugs at two labs in Barcelona.
The organisation included traffickers from Spain, The Netherlands, Romania, Colombia and Italy and had bases in Barcelona, the southern city of Malaga and the island of Ibiza, all of which are known for having a vibrant nightlife and many dance clubs.
Although Spain is considered one of the main drug gateways to Europe, seizures of synthetic narcotics are uncommon as most traffickers usually deal in cannabis and cocaine.