A Treta yuga Avatar
The fourth descendant of Hiranyakashyap, Bali, with devotion and penance was able to defeat Indra, the god of firmament. This humbled the other deities and extended his authority over the three worlds. The gods appealed to Vishnu for protection and he descended as the dwarf Vamana. During a yajna of the king, Vamana approached him and Bali promised him for whatever he asked. Vamana asked for three paces of land. Bali agreed, and the dwarf then changed his size to that of a giant. He stepped over heaven in his first stride, and the netherworld with the second.
Bali realized that Vamana was Vishnu incarnate. In deference, the king offered his head as the third place for Vamana to place his foot. The avatar did so and thus granted Bali immortality. Then in appreciation to Bali and his grandfather Prahlada, Vamana made him ruler of Pathala, the netherworld.
Vamana taught King Mahabali that pride should be abandoned for advancement in life, and that wealth should be appreciated as it can easily disappear.