Accounts of Hanuman's birth vary across the Ramayana tradition and later Puranic elaboration, but the most widely told version describes him as the son of Vayu, the Vedic wind god, and Anjana, described variously as an apsara or a vanara woman living under a curse that could only be lifted by giving birth to a son. Several tellings connect his conception to the same sacrificial rite that led to Rama's own birth, describing Vayu delivering a portion of the sacred payasa intended for King Dasharatha's queens to Anjana instead, making Hanuman's birth narratively parallel to, and roughly contemporary with, Rama's own.
Even as an infant, tradition holds, Hanuman displayed extraordinary strength and divine power, including an episode in which he mistook the rising sun for a fruit and leapt toward it, an act that drew the attention and, in some versions, the mild punishment of the gods, who subsequently granted him various boons tempering his power until it would be needed for a righteous purpose.
Hanuman grew to become the devoted minister and general of the monkey king Sugriva, and, following his introduction to Rama during the search for Sita, became Rama's foremost devotee and instrument, playing a decisive role across the Ramayana's later books, including locating Sita in Lanka and leading forces in the war against Ravana.