Bali, the King of the Daityas or Asuras i.e. demons in the Treta-Yuga, or the second epoch of the Cosmos, reached the zenith of power and fame. He owed his tremendous success and prosperity in life to his observance of an austere and virtuous lifestyle. He performed a lot of ritual sacrifices or Yajna to consolidate his sway over the three worlds of the universe, namely Heaven, Earth and Underworld.
or gods were pretty alarmed by this growing command of Bali, over the three worlds. They resorted the sanctuary of Protection, MahaVishnu
Vishnu camouflaged himself in the diminutive form of a dwarf, and visited Bali, on the occasion of his last Yajna. He approached the generous Bali, venerated also as Mahabali, for alms. He revealed before Bali, his deep desire. He told that he wished that King Mahabali would gift him as much land as he could cover with his three steps. Bali delightfully agreed to the request.
Sukracharya, the wise and visionary Guru or Teacher of the Daityas, could identify Vamana as Vishnu. He advised Bali not to concede to the Vamana`s wish, but Bali suspected nothing. He was probably, relaxed, thinking of the small amount of land that the little foot-size of the Vamana could cover.
Vamana assumed an awesome colossal stature, before the stunned Mahabali. With one-step he astrode the whole earth and in the second he, encompassed the heavens. King Mahabali, then recognized the Transcendental Being of Vishnu, disguised as Vamana. There was no place left where Vamana can put his third step. The pious and truthful Mahabali, kept his promise. He bowed down before the Omnipotent Power and offered his head, for putting the third step. Vishnu was immensely pleased with the goodness of Mahabali. He educated Bali about the demerits of pride and arrogance, which forbids man from optimum progress. He allowed Mahabali to take shelter in the Paradise of the sacred abode, where lived the pure Prahlada. MahaVishnu further blessed Mahabali, that he would be the ruler of the earth in the following age or Yuga.
More on Vamana