They say a man aged 43 was taken into custody after trying to drag away an eight-year-old boy, grabbing him and hiding him under his cloak.
He had expected to go unnoticed, dressed as one of the Magi, or Three Kings as they are known in Spain, surrounded by dense crowds of families with children.
But a 10-year-old relative of the would-be victim noticed what had happened and shouted for help, alerting his family and other pedestrians, who went after the kidnapper.
They managed to pin him down and keep him restrained until the police got there, although he fought hard against them.
The suspect has been remanded in custody, and police believe he may suffer from a psychiatric disorder.