A study by the IESE Cities in Motion Index rated 180 cities across the world in a study measuring sustainability, quality of life and a variety of parameters to judge overall intellect.
The study examines aspects such as economics, technology, social cohesion, mobility, urban planning and governance.
The top two Spanish cities were Madrid, which ranked 28th, and Barcelona, which came ??in 35th.
The index also revealed hows that Spanish cities, with the exception of Madrid and Barcelona, ??score very low in the classification of economy, human capital and social cohesion.
New York topped the list, while London just missed out in second.