Sugriva and Vali were brothers. Vali ruled Kishkinda, the Vanar kingdom (monkey kingdom). The brothers loved each other but destiny made them enemies. Legend has it that once a demon named Mayavi came to Kishkinda and started killing monkeys and destroying fruit bearing trees.
Vali challenged Mayavai. The demon was no match to Vali in strength and he escaped and hid in a cave. Vali and Sugriva pursued the demon and challenged him in the cave.
Vali asked Sugriva to wait outside the cave. Several days passed and Sugriva heard roars from inside and breaking of rocks. Then one day there was silence inside the cave.
Sugriva did not hear the customary yelling of Vali after defeating his enemy. Suddenly Sugriva noticed blood coming out of the cave. Sugriva thought that Mayavi had killed Vali. To stop the Mayavi from escaping from the cave, Sugriva closed the mouth of the mountain with a huge rock.
Sugriva then reached Kishkinda and narrated what had happened. He then declared himself as the next king.
Vali was not dead. After killing the demon, he had become tired and was resting. When he recovered, he came out of the cave and was furious to find that Sugriva had declared himself as the king.
In anger, Vali chased Sugriva out of Kishkinda. Thus the two brothers became enemies.