When Rama came to know about the defeat of Bharata and Hanuman at the hands of Luv and Kush, he decided to go to Sage Valmiki's ashram himself and meet the boys. When he reached the ashram and met Luv and Kush, he asked them who they were. Luv replied that they were the children of Vanadevi, as Sita was known in the ashram. They said that sage Valmiki had educated them.
As soon as Rama heard this, he realised that these brave young boys were his own sons. In the meantime, Luv and Kush started shooting arrows at Rama and his army. Just then, Sage Valmiki appeared. He told the boys that Rama was actually their father. Rama hugged his children and wept with joy.