Canto 1 - Boyhood
Bāla-kāṇḍa
Chapter 17: Brahmā Orders the Demigods to Incarnate and Assist Rāma
Text 1.17.10

वानरेन्द्रं महेन्द्राभमिन्द्रो वालिनमूर्जितम्।
सुग्रीवं जनयामास तपनस्तपतां वरः॥

vānarendraṁ mahendrābham indro vālinam ūrjitam
sugrīvaṁ
janayām āsa tapanas tapatāṁ varaḥ

vānara-indram = king of the monkeys; mahendra-ābham = who shone like the Mahendra hill; indraḥ = Indra; vālinam = Vālī; ūrjitam = [gave birth] to the strong; sugrīvam = to Sugrīva; janayām āsa = gave birth; tapanaḥ = Sūrya; tapatām = of those who radiate heat; varaḥ = the best.

Indra gave birth to the strong king of the monkeys, Vālī, who shone like the Mahendra hill. Sūrya, the best of those who radiate heat, gave birth to Sugrīva.

How can it be said that Vālī was born to assist Lord Rāma? [After all,] he was killed by Rāma.

He was instrumental in assisting Rāma by giving birth to Aṅgada. If Vālī would not have taken birth, there would not have been the assistance of all the monkeys. Because of Vālī’s enmity with Sugrīva, Rāma got the assistance of the monkeys through His friendship with Sugrīva. If Rāma had become a friend of Vālī, Rāvaṇa would have returned Sītā back in a moment. Therefore, Vālī assisted Rāma through Rāma’s friendship with Sugrīva.