The leftist government in Madrid said the war against Iran violated both international law and the agreement between Spain and the United States on the use of air bases.