Legend behind Onam : According to the legends, Kerala was ruled by the Demon King 'Mahabali'. He was a very good ruler. So his fame spread far and wide. It is believed that Kerala had its 'Golden days' during the reign of Mahabali. There were no differences between the rich and the poor. All were treated alike. There were no corruption or crime in Kerala during Mahabali's rule.
Gods in the heaven feared that he will become very powerful and that would be a challenge and threat to their supremacy. They began to think of a solution for the problem. 'Adithi', the Mother of Gods, sought the help of Lord Vishnu. Mahabali was an ardent devotee of Lord MahaVishnu, though he belonged to the Demon community. Lord Vishnu agreed to help the Gods.
Mahabali was a very generous King. He gave away anything requested from him to anybody. Lord Vishnu disguised himself as a dwarf Brahmin boy named 'Vamana'. This was one of the incarnations of Lord Vishnu. He asked Mahabali for three steps of land. Mahabali agreed to give him what he asked for. King's learned advisor 'Shukracharya' sensed that Vamana was not an ordinary person and warned the King against his promise. But Mahabali refused to hear him.
When Mahabali agreed to give away three steps of land and asked Vamana to take it where ever he wishes, Vamana began to grow in size and became the size of cosmic proportions. With the first step, Vamana covered the whole of the Earth and with the second step he covered the skies. Then he asked Mahabali, space to keep his third foot. The King understood that Vamana is not an ordinary person and folded his hands and asked Vamana to place his third foot on his head. Vamana kept his foot on the King's head and pushed him to 'Patala', the Nether World.
Lord Vishnu appeared before the King in his true form. Lord granted Mahabali a boon. King wished to visit his kingdom and people once a year. Lord Vishnu granted him with his wish and asked him to visit Kerala on the Thiruvonam day in the month of Chingam. It is the day of Mahabali's visit to Kerala, Keralites celebrate Onam every year. Mahabali is known as 'Onathappan' in Kerala.
Onam is marked in 'Thrikkakara', a place about 10 km from Kochi. 'Thrikkakara' was the capital of the King Mahabali. A temple with a deity of 'Trikkakara Appan' or 'Vamanamurthy' who is Lord Vishnu himself in disguise is also located at this place.