The devotion to the Santo Niño de Atocha originated in Spain; it is said to be related to Our Lady of Atocha, who is mentioned in the "Cantigas" of King Alphonse the Wise in the 13th Century. In 711 the Moors held sway over vast regions of Spain and battles between Catholics and Moors were common. The latter invaded the town of Atocha, near Madrid, and were victorious keeping many Catholics captive and even prevented the villagers from bringing food and water to the captives, except children under twelve, who were permitted to assist the prisoners. For those who had no family members nearby, this would have been a certain death sentence. Fearing for the lives of the prisoners, their families prayed incessantly to God for relief and implored the Mother of God under the title, Our Lady of Atocha. One day a child around the age of twelve appeared, dressed as a pilgrim of that period, carrying a basket of food and a gourd of water. The Moors allowed Him to bring food and water every day. All the time the captives were fed, the basket and gourd remained full. The child was not known to anyone by name, but all the people realized that He was the Child Jesus, disguised as a pilgrim, who had come to their rescue. When the women heard the stories from the children about the Santo Niño, they rushed to the chapel to thank Our Lady for sending her Son. Upon entering the chapel, they noticed that the shoes of the Infant in the statue of Our Lady of Atocha were dusty and worn out. The women in the village replaced His shoes, but, time and time again found them dusty and worn out.
In artwork, the Holy Child often wears a brimmed hat with a plume and a cloak or cape ornate with the St. James shell; during the Crusades, scallop shells were the symbol of holy pilgrimages and one European variation is still referred to as "the pilgrim" or "St. James shell." In His left hand, He carries a pilgrim's staff fastened to the gourd, a pair of shackles, and a few spikes of wheat. In His right hand, he holds a basket which generally contains bread or flowers or sometimes it appears empty even though it isn't. Then the flowers are depicted as outside of the basket, adorning the image to one side and they are almost always roses.