According to a new announcement by Agencia Tributaria (Spanish Customs House), from 20th May 2019 onwards, customs clearance of the export cargo cannot be arranged until the goods are inside the Port Terminal.
The main change is that it will be compulsory and automatically verified. This will be done when the containers will be inside the port terminal. If this is not the case, any circuit will be assigned (green-orange-red), so the cargo will not be customs cleared until the goods physically enters the terminal. This may represent delays in customs procedures, mainly in the case of orange and red channels.
Below, you will find a link to expand information: