Mahabali was a great king of the Asuras(demons). Once he performed a big ritual during which he gave away lots of gifts to all the people who visited him. He was proud of himself and gave more and more to the people who were arriving. At the end of the ritual, a small boy visited him. The Asura king asked him what he wanted as a gift. The boy told him that he only wanted to have a small piece of land about the size of his small feet. The king was surprised about the humble request but anyway offered to give the boy what he wanted. In those days if a king gave his word on something he was duty-bound to do it. As soon as the king gave his word, the boy suddenly started growing size. He was growing so fast and so huge that with one foot he covered the whole earth. He told the king that he had covered the whole earth and did not have any place left for his second foot. The proud and arrogant king realized that the boy was none other than God himself who had come in the form of a boy to humble him. He realized that this was the time to seek refuge in God and offered his own head for the boy to place his second foot. God placed his second foot on the king's head and the king reached the heavens because of God's grace.
The above story is from the Dasavatharam, or the story of God's Ten Incarnations from the Hindu mythology.