The King of asuras - Mahabali (the grandson of Prahaladha) was a great bhakthan of Sri Vishnu. He had a great pride about his Dhaanams. A good person should not have pride of his own. So, to reduce it, the Perumal Himself incarnated as "Sri Vaamanar". He approched Mahabali for 3 steps of land with His legs. On seeing the small structure of Vamanar, the king agreed.
Suddenly with a surprise, Vaamanar grew up extending Himself higher the all the Lokams. He measured the entire earth with the first step and the other lokams with His second step.