In the whole Orient, only here did the Church display its old genius for using and transforming the material it found -- and that is why our Christian "veneer" has proved so durable, being rooted to our soil. And the Church could not do otherwise, because there was one ahead of it to show the way. Again, it was merely following the lead of its Lord. For the Child was here before the missionaries, the Child was here before the Church. The Child was willing to join our pagan idols, if only to defeat and demolish them. The Child was willing to live a pagan among us, and to become a rain god for us, and to bless our heathen ceremonies. But all the time it was preparing us for the faith.[Nick Joaquin, "Culture Hero: The Santo Niño de Cebu", Culture and History, Anvil (Mandaluyong City: 2004) p. 108.]
The origins of the Santo Niño de Cebu are lost to history. It was probably carved in the fifteenth century by Flemish sculptors; it is usually said to be based on a vision by St. Teresa of Avila. In any case, it came into Castilian hands and thence went on a trip around the world. In 1519, Ferdinand Magellan, despite being Portuguese, helped the Spanish to organize a major expedition in search of new commercial routes to Asia, and when Magellan set sale, the statue of the Christ Child set sail with him. In 1521, having arrived in the Philippines, Magellan befriended Rajah Humabon of Cebu, who was, with his wife, baptized. According to Pigafetta, the queen was shown the Santo Niño and was very moved by it, asking if she could keep it. And so it was given to her.
Magellan went on to die shortly afterward at the Battle of Mactan, and the Spanish expedition returned home, having circumnavigated the world. One would have thought that the end of it, but no. In 1565 a new Spanish expedition arrived in the Philippines, under Miguel Lopez de Legazpi. Unlike the previous expedition, they were not well received, and battle ensued, with the Spanish massively overpowering the natives. The native village at Cebu burned to the ground. But one hut seems to have remained intact, and to their astonishment the Spanish found the Christ Child in it, certainly the same image that had sailed with Magellan. The locals may well have been worshiping it as a rain god, which is the possibility to which Joaquin refers above. Many of the more peculiar practices by which the Feast of the Holy Child of Cebu is commemorated are thought to go back to the pagan celebrations associated with the image during which the local natives worshiped a God they did not know.