In the 13th century, Spain was under Muslim rule. The town of Atocha, a now-lost district nearby Arganzuela, Madrid was lost to the Muslims, and many Christians there were taken prisoners as spoils of war. The Christian prisoners were not fed by the jailers, but by family members who brought them food. According to pious legend, the caliph ordered that only children under the age of 12 were permitted to bring food. Conditions became increasingly difficult for those men without small children. The women of Atocha prayed before the statue of Our Lady of Atocha at a nearby parish, a title of the Blessed Virgin Mary, to ask her son Jesus for help.[2]
Reports soon began among the people of Atocha that an unknown child under the age of twelve and dressed in pilgrim's clothing, had begun to bring food to childless prisoners at night. The women of the town returned to Our Lady of Atocha to thank the Virgin for her intercession, and noticed that the shoes worn by the Infant Jesus were tattered and dusty. They replaced the shoes of the Infant Jesus, but these were became worn again. The people of Atocha took this as a sign that it was the Infant Jesus who went out every night to help those in need.[2]
http://en.wikipedia.org/wiki/Santo_Ni%C3%B1o_de_Atocha