A pigeon smuggling cocaine and cannabis into a Costa Rican prison has been caught by guards. The winged criminal was intercepted as it landed in the grounds of the medium security La Reforma jail, in San Rafael de Alajuela.

Guards found a small sack strapped to the bird's chest containing around 14g of cocaine and 14g of cannabis.

Costa Rica's Ministry of Justice and Peace posted a mugshot online of the bird, using the headline "narcopaloma," meaning "drugs dove."

Guards believe the pigeon was groomed by an inmate, who had trained it to act as a courier.

It was taken to a zoo, where keepers said it may have to remain in captivity, as it had become accustomed to being hand fed.

Prison police director Paul Bertozzi told Spanish news agency Efe that the incident was unsurprising.

"Drug traffickers are using unimaginable ways to achieve their macabre atrocities," he said, in comments reported by Sky News.

"This is nothing new. In the past [traffickers] have used cats and dogs to pass drugs to prisoners. Now it seems they are using pigeons to carry in their wares from the outside."

Although it is the first time a pigeon was caught smuggling drugs in Costa Rica, it is not the first time the birds have been used as drug mules.

In Argentina in 2013, police intercepted a bird transporting marijuana from a dealer to clients, while a carrier bird that was used to smuggle drugs into a Colombian prison was captured by authorities in 2011.

As well as smuggling drugs and transporting hundreds of thousands of messages during wartime, pigeons have also been suspected of spying.

In May, police in India detained a pigeon on suspicion of spying for rival Pakistan, after a 14 year-old in the village of Manwal, near the India-Pakistan border, found a note in Urdu under the pigeon's feathers.

Although police did not find anything usual, they kept the bird in custody and logged it as "a suspected spy."