A television broadcast from one of the world's most prestigious cycling races has inadvertently led to the discovery of a rooftop marijuana plantation.

Key points: Police received a tip-off after someone noticed the plantation while watching highlights race organisers had posted on social media

Police received a tip-off after someone noticed the plantation while watching highlights race organisers had posted on social media The regional police said officers seized 40 plants from the roof of the building in Igualada

The regional police said officers seized 40 plants from the roof of the building in Igualada Officers are investigating the plantation and have not made any arrests

Spanish police announced they had seized 40 marijuana plants from the roof of a building in the town of Igualada, north-west of Barcelona, after footage was broadcast from a helicopter during stage eight of La Vuelta a Espana.

Race organisers shared highlights of the stage on their social media accounts, but eagle-eyed observers noticed something extra in the videos.

The union representing Spain's Guardia Civil police then re-shared the video, highlighting the location of the plantation.

"We received information via social media that there was a marijuana plantation on the roof of a block of flats in Igualada," a spokeswoman for the Mossos d'Esquadra, the Catalonian regional police force, told The Guardian.

"We began an investigation, which is still underway, and we have seized 40 plants.

"For the moment, there have been no arrests."

Police seized 40 marijuana plants after a tip-off about the rooftop plantation. ( Supplied: AUGC Guardia Civil )

The Guardian reported that the officers were investigating who owned the plants, as the terrace was not connected to the apartments in the building.

Spain has decriminalised the personal cultivation and use of marijuana, but it is still illegal to grow the drug for commercial purposes.

The 21-day La Vuelta is one of cycling's famous "grand tours", along with the Giro d'Italia and the Tour de France.