The fifth avatar, Vamana, appeared in the Tretayuga in order to destroy Bali, the king of demons. The fourth lineal descendant of Hiranyakashyap, named Bali, through his devotion and penance defeated Indra, the Hindu god of firmament, humbled other gods and extended his authority over the three worlds. All the gods appealed to Lord Vishnu for protection and He became manifest in His Dwarf Avatar of Vamana for the purpose of restraining Bali.
When Bali was making a great religious offering, Lord Vishnu in the form of Vamana, a dwarf brahmin, appeared before him in the company of other Brahmins. Bali was extremely pleased to see a holy man with such a diminutive form and promised to give him whatever he should ask. Lord Vishnu asked only for as much land as he could measure by three steps. Bali laughingly agreed to grant the boon of three steps. Lord Vishnu grew in stature and thus stepped over heaven in his first stride and earth in the second stride. Then out of respect to Bali’s kindness and his grandfather Prahlad’s great virtues, Lord Vishnu stopped short and left him in pathal, the subterranean region. Thus, Vishnu as the dwarf brahmin Vamana, vanquished the demon king Bali and restored the three worlds to their rightful moral code. Bali’s capital was Mahabalipuram.