the powerful asura king who was the great grandson of Hiranyakasibu had
conquered the three worlds, but in spite of being an asura, he ruled his
land and people with justice.
Even though Bali was just, Indralogam had to be returned to the Devas, who felt humiliated at the loss of their kingdom. Lord Vishnu could not fight so virtuous a king, and therefore he took the guise of a Brahmin boy.
Bali was performing a yagna and for the success of the yagna he had to provide anything that a brahmin seeks. Lord Vishnu in his Vamanavataram begged for just three feet of land. This request was considered funny, for three steps of Vamana's feet would measure upto a very small piece of land only. Bali humbly requested him to ask for something better which he would grant. But Vamana insisted on his three feet of land.
To the astonishment of all present, Lord Vishnu as Vamana began to grow to a great height and with one step he covered the whole earth, with his second step he covered the entire sky and region above. With the entire universe covered, Bali had no more land to offer. He bowed down in front of the Lord & offered his head for the third step. Lord Vishnu had thus regained the power from the asura king. Being extremely pleased with the virtuosity of an asura king, he placed his foot on his head and sent him to rule over the lower regions.
Vishnu is worshipped as Trivikramar or Ulagalanda Perumal. There are shrines to this avataram of Vishnu at Tirukkoyilur in South Arcot district (Trivikramar) and at Kanchi (Ulagalanda Perumal).