During the medieval period in India, worshipers of Surya formed one of the five principal sects. Worship of Surya ranked with the worship of Shiva, Shakti, Vishnu and Ganesha. The importance of the Sun God Surya is evident in Vedic hymns and Hindu mythology. The Gayatri hymn from the Rig-Veda identifies Surya with the Hindu Trinity. The hymn is addressed to the sun and associates Brahma with the sun in the morning, Shiva with the sun at midday, and Vishnu with the sun in the evening. The worship of Surya is mentioned repeatedly in the Ramayana, the oldest epic in Sanskrit literature. After offering a prayer to Surya, Rama overcomes his enemy with ease.