Dune vegetation is key to providing a habitat for certain species that are thriving better amongst the sand than in the parks in and around the Catalan capital.
Seventeen species of butterflies were identified on the four beaches south of Barcelona that were studied: Castelldefels, Gavà, Viladecans and El Prat.
The most commonly found species are the common blue, the painted lady and the clouded yellow, with the latter two being discovered in larger numbers on beaches than in parks.
In total, the study found 2,205 butterflies of 40 different species in a total of 21 spaces.
In terms of parks, the most diverse were found to be Pinetons in Ripollet, Canal de la Infanta in Cornellà de Llobregat and Calamot in Gavà.