Lord Vishnu incarnated as Vamana or the ‘midget incarnation’ during the Thretha Yuga (The second leg of Manvantara) and before the occurrence of the great Ramayana. He incarnated during the time of Emperor Mahabali (also known as Maveli or Bali). This is the first incarnation of Lord Vishna in full human form.
Present Kerala (a Southern State of India bordering Tamil Nadu) was ruled by King Maha Bali. Onam, a festival celebrated by Keralites every year (New Year), according to a legend, marks the resurgence of King Mahabali from the nether world.
Despite being born in the lineage of Asuras, Mahabali was very religious and performed Vedic rites. He worshipped Lord Vishnu with a great devotion. He was benevolent and prudent. During his reign, his kingdom flourished in wealth and prosperity. There was no discrimination among the masses based on caste or creed, in his kingdom. All were treated equally regardless of their financial status. There was no trace of corruption or crime and hence, the doors of the masses were never locked. As he descended from Diti, the mother of Asuras, he was considered a threat by the Devas.
The skies with his second step, then, he asked Bali to show him a place where he could place his 3rd foot. It dawned on to Bali, that the Brahmin was not an ordinary human but Lord Vishnu. Following this, Bali offered him to place his 3rd foot on his head. Bali was asked to go to the nether world (Patala) by Lord Vishnu. To this, King Mahabali agreed but pleaded him to be allowed to resurge to the Earth. Once in every year, in order to ensure the well being of his masses. This wish of Bali was granted by Lord Vishnu.