Police have seized 40 marijuana plants thanks to images recorded by a helicopter filming the Vuelta a Espana cycling race on Saturday, Spanish authorities have confirmed to ESPN.

As the helicopter tracked cyclists during the final kilometre of the race's eighth stage, which started in Valls and finished in the Barcelona town of Igualada, bird's-eye view shots panned over an apartment rooftop with 40 marijuana plants spread out across two abandoned plots.

The images went viral on social media and prompted Catalan's police, the Mossos, to act.

"We received information thanks to the images that individuals posted on social media that had been taken from the helicopter of La Vuelta," a Mossos spokesperson told ESPN.

"That has helped us to seize 40 marijuana plants. No one has been arrested, but the investigation is still ongoing to find those responsible."

Spanish law does not penalise the cultivation of marijuana for self-consumption, although it does not specify how large a home plantation is allowed to be.

The Vuelta a Espana is among the leading multiple-stage races in the international calendar and is primarily held in Spain.