The narcotics agents were carrying out a routine drugs inspection at Madrid's Barajas airport when they spotted the man behaving suspiciously.
These doubts proved to be well-founded. The man, a passenger from Panama, was carrying two packages of cocaine inside his prosthetic limb.
The leg contained 750 grams of the drug and the criminal was immediately arrested.
In another incident on June 4th at Barajas airport, an airport employee and a passenger arriving from Peru were both arrested for trying to smuggle 10kg of cocaine into Spain.
The passenger's nervous attitude prompted police to check his suitcase where the drugs were found.
When the man was arrested, he admitted that he was planning to hand the drugs over to a member of staff at the airport.
Spain's close ties with its former colonies in Latin America, a major cocaine-producing region, have made it a key entry point for the drug in Europe.
Last year police seized two tonnes of narcotics, mostly cocaine, and detained 461 people for drug trafficking at Barajas, Madrid's main airport.
Just over 45 million passengers passed through the airport last year, making it Spain's busiest.