In Madrid, authorities activated a red alert for the first time since the system was adopted four decades ago and called in the military to rescue people.