The Spanish law different form other European countries states that any resident in Spain should pay his taxes on his vessel.
But there are several different cases:
For a new boat the tax has to be paid, stating that the vessel will not sail under the Spanish boat registration.
If the boat is on the 6a list and no taxes have been paid due to tax exemption on this vessel, the tax would have to be paid when changing to a foreign boat registration.
If the boat was registered under the Spanish boat registration and taxes were paid , it is very important to keep the documents as this tax only has to be paid once and you need the documents to prove it.
If the Boat was registered under the Spanish boat registration before the Impuesto de matriculacion was established, the tax department considers the tax paid.