US airlines are not exempt from this regulation, despite their best efforts to pretend that they are. Write to the following agency:
Agencia Estatal de Seguridad Aérea.
División de Calidad y Protección al Usuario.
Avda. General Perón 40, Acceso B, (Recepción planta 1a)
28020 MADRID
Tel.: + 34 91 396 82 10
http://www.seguridadaerea.es/
You can write in English. As the flight originated in Barcelona, they are the competent authority.
There is a standard form you can use to file your complaint. It is available here..
http://ec.europa.eu/transport/themes/passengers/air/
Send a copy to AA so they know you are pursuing the complaint. They may reply claiming extraordinary circumstances. If they do, insist they tell you what these are, so you can challenge them. Mechanical breakdowns are NOT routinely regarded as extraordinary circumstances.