Ravana was born to a great sage Vishrava (or Vesamuni), and his wife, the daitya princess Kaikesi. He was born in the Devagana gotra, as his grandfather, the sage Pulastya, was one of the ten Prajapatis or mind-born sons of Brahma and one of the Saptarishi (Seven Great Sages Rishi) in the first Manvantara.Ravana was thus partly Brahmin and partly Daitya. Even though he was partly Brahmin and partly Rakshas, Rama praised Ravan as Mahabrahmin. Rama had to do Ashwamedha yagna as penance for killing a Brahmin (Brahmahatyadosha).