In the Ramayana, Surya is described as father of the King Sugriva, who helped Rama and Lakshmana in defeating the demon king Ravana. He also trains Hanuman. The Suryavanshi dynasty of kings, Rama being one of them, also claims descent from Surya.
In the Mahabharata, Princess Kunti receives instruction for a mantra from the sage Durvasa; by reciting which, she would be able to summon any god and bear a child by him. Incredulous of the power of this mantra, Kunti unwittingly tests it on Surya, but when Surya appears, she gets scared and requests him to go back. However, Surya has an obligation to fulfill the mantra before returning. Surya miraculously causes Kunti to bear the child immediately whilst retaining her virginity so that she, as an unmarried princess, need not face any embarrassment or be subjected to questions from society. Kunti feels compelled to abandon the child, Karna, who grows up to become one of the central characters in the great battle of Kurukshetra.