When Baali had emerged victorious over the rakshasa, he had found that the entrance to the cave was blocked.
He journeyed back to kingdom to find Sugriva ruling in his place. Sugriva tried to explain the situation to Baali, he would not listen.
Baali then nearly kills Sugriva, except that Sugriva was able to escape his grasp.
When Baali chased Sugriva out of his kingdom, he also claimed Sugriva's main wife, Rumā. Sugriva fled into the forest where he eventually meets Rama and Lakshmana.