A flashing red light or two alternately flashing red lights of a traffic signal...

In Spain, a flashing red light (or two alternately flashing red lights) means temporary absolute prohibition of passage. You must stop completely, and you are not allowed to proceed until the lights turn off.
Unlike a solid red light at a regular intersection, this specific signal is used to warn drivers of an immediate, temporary hazard ahead.
Where you will see this in Spain:
Pasos a nivel: Railway level crossings when a train is approaching.
Puentes móviles: Movable bridges when they are opening for boat traffic.
Tunnels or Fire Stations: To block traffic during an emergency or when emergency vehicles need to exit immediately.
Low-flying aircraft zones: Near airports or airfields when a plane is landing or taking off.
⚠️ The Big Difference from Iran:
In Iran, a flashing red light acts like a Stop Sign (you stop, yield, and proceed when safe). In Spain, it acts like a Closed Barrier—you cannot pass at all until the lights stop flashing.
If you just slow down or pass with caution, it is considered a severe traffic violation.