King Bali (Mahabali) was born to Devamba. The asura king was trained by was mentored by his grandfather, Prahlada and eventually succeeded him to the throne. As an asura king, Mahabali was revered for his morality and administrative prowess. He was known to be the most generous kings alive. Being overtly ambitious, he wanted to be the emperor of all the three realms of the Universe; the Earth, the Heavens, and the Underworld. He defeated the King of the Devas, Indra and became the Lord of all the three world. He also started the Ashwamedha Yagna (horse ritual) to keep his rule over all the three realms of Universe.
The Gods were unhappy to be defeated by an Asura so pleaded with Lord Vishnu to intervene. In the guise of a young brahmin boy, Mahabali met Vishnu’s Vamana avatar, who asked the asked the Great King for three feet of land. Mahabali agreed readily looking at his tiny size and on cue Lord Vishnu’s body grew in enormous proportions. He placed one feet on the Earth, the other on the Heavens and asked Mahabali where he should place this third feet. The pious Mahabali bowed his head in response and Lord Vishnu placed his feet on Bali’s head. As a result, King Mahabali was pushed into the Underworld or Pataal.
When King Mahabali was being pushed into the Underworld, he asked Lord Vishnu for one last boon. He wished to return to Kerala once every year to overlook the well-being of his people, to which Lord Vishnu acceded. It is believed that during Onam, Mahabali visits his people for 10 days every year.