According to the 'Soot-free City' ranking of 23 European cities, Madrid trailed behind other major metropolises, scoring only 58 percent on a test of efforts to reduce emissions, promote sustainable transport and in general work towards improving air quality.
The rankings, released by a campaign of German environmental and consumer associations, including Friends of the Earth Germany, rated cities based on their activities considered important by the European Commission and the cities themselves.
Criteria included technical reduction measures, such as having low emission zones, sustainable transportation as well as the city's success in reducing emissions.
"The city used to have a very extensive metro system that it continuously expanded, but due to the economic crisis the city has cut important subsidies for the public transport system and since then the quality and size have deteriorated massively," the report said of Madrid.
Madrid was one of six cities to receive a failing grade, which was less than 59 percent, along with Dublin, Glasgow, Rome, Lisbon and Luxembourg City.
The capital city has struggled to reign in air pollution in recent years, with local residents calling the cloud of smog hanging over the city the grey "beret".
Campaign group Ecologists in Action estimates that air pollution, mainly due to traffic fumes, causes 2,000 deaths a year in Madrid, a city of about 3.2 million inhabitants, where there is about one vehicle for every two people according to authorities.
A study by the World Health Organization last year found that 36 percent of the Spanish population is exposed to unhealthy air pollution levels above EU safety limits.
Though no city received a top 'A' grade, Zurich came the closest with an 89 percent 'B+' grade. The runner-up was the bicycle-loving city of Copenhagen.