The European Commission has said that Spain could face legal action and hefty fines if it does not reduce nitrogen dioxide (NO2) levels within the next two months.
Every year more than 400,000 Europeans die because of poor air quality.
Madrid and Barcelona are the most badly-affected areas in Spain, with pollution levels of up to 53 micrograms of nitrogen dioxide per cubic metre (µg/m3), 33% over the EU legal limit of 40µg/m3.
Granada has the highest levels of pollution in Andalucia, with 42µg/m3 in the Granada Norte station.
Germany, France, Italy and the UK were also issued with a warning.