(Vintage painting of Lord Vamanadeva stepping on Bali Maharaja's head)
"The history of Bali Mahārāja and his charity to Vāmanadeva is described in the Eighth Canto of Śrīmad-Bhāgavatam. Bali Mahārāja conquered all the planets of the universe by rightful possession. A king can conquer other kings by strength, and such possession is considered to be rightful. So Bali Mahārāja possessed all the lands of the universe, and he happened to be charitably disposed toward the brāhmaṇas. The Lord therefore pretended to be a beggar brāhmaṇa, and He asked Bali Mahārāja for a measurement of three footsteps of land. The Lord, as the proprietor of everything, could take from Bali Mahārāja all the land he possessed, but he did not do so because Bali Mahārāja possessed all those lands by king's rights. When Bali Mahārāja was asked by Lord Vāmana for such small charity, Bali Mahārāja's spiritual master, namely Śukrācārya, objected to this proposal because he knew that Vāmanadeva was Viṣṇu Himself, pretending to be a beggar. Bali Mahārāja did not agree to abide by the order of his spiritual master when he understood that the beggar was Viṣṇu Himself, and he at once agreed to give Him in charity the land requested. By this agreement Lord Vāmana covered all the lands of the universe with His first two steps and then asked Bali Mahārāja where to place the third step. Bali Mahārāja was very glad to receive the Lord's remaining step upon his head, and thus Bali Mahārāja, instead of losing everything he possessed, was blessed by the Lord's becoming his constant companion and doorman. So, by giving everything to the cause of the Lord, one does not lose anything, but he gains everything that he could never otherwise expect."
(Śrīmad-Bhāgavatam 2.7.17, Purport)
.
.