Rāhu’s head, however, having been touched by the nectar, became immortal. Thus Lord Brahmā accepted Rāhu’s head as one of the planets. Since Rāhu is an eternal enemy of the moon and the sun, he always tries to attack them on the nights of the full moon and the dark moon.
Srimad Bhagavata Purana
श्रीमद्भागवतमहापुराणम्
मूल श्लोकः
शिरस्त्वमरतां नीतमजो ग्रहमचीकॢपत् । यस्तु पर्वणि चन्द्रार्कावभिधावति वैरधीः
śirastvamaratāṃ nītamajo grahamacīkḷpat | yastu parvaṇi candrārkāvabhidhāvati vairadhīḥ
SB 8.9.26