temple faces west instead of east, signifying victory. There are two temple tanks: Swami Pushkarini near the temple and Gangadhara at the bottom of the hill. The temple houses a number of sub-shrines and a few mandapams. The religious practices and customs of the temple are formulated by the Vaishnavite philosopher Ramanuja. They are modelled based on the Satvata Samhita, one of the 108 texts of the Pancharatra Agama. Simhachalam is the second-largest temple, after Tirumala in Andhra Pradesh, in terms of income earned. Devotees believe that the deity is capable of giving progeny to women and fulfilling the wishes of devotees. Kalyanotsava and Chandanotsava are the two major festivals celebrated in the temple, followed by Narasimha Jayanti, Navaratrotsava and Kamadahana. The festivals celebrated in Simhachalam have an influence of the Dravida Sampradaya. Apart from those by well-known poets, the temple is found in many literary references and lyrical works (dedicated by anonymous writers), which are preserved in the Government Oriental Manuscripts Library, Chennai. Legends associated with temple The Sthala Purana (local legend) of Simhachalam consists of 32 chapters; the number denotes the manifestations of Narasimha. According to Dr. V. C. Krishnamacharyulu, the legends of Simhachalam and other Hindu temples in Andhra Pradesh were written in the 14th century after the attempted establishment of Islam in the region. He added that the writers wrote the legends inspired from the stories of Narasimha available in the Hindu puranas. Hence, Vishnu Purana and Bhagavata Purana form the major sources. However, the legend of Simhachalam provides new information about the previous life of the temple's founder Prahlada. The first four chapters of the legend cover the importance of Simhachalam, its deity and the principal water body Gangadhara. Origins of the temple Once, the Four Kumaras visited lord Vishnu abode Vaikuntha as children. Jaya-Vijaya, the demigod gatekeepers of Vaikuntha, failed to recognise them and denied their entry. In resentment, they cursed the duo stating that they would have to give up divinity, born and live the lives of mortal beings on earth. Vishnu failed to revoke the curse of the Kumaras and felt sorry. He later offered two solutions: either being Vishnu's devotees in seven human lives or his enemies in three demonic lives. Jaya-Vijaya could not bear separation with Vishnu for a long time and chose the second possibility. In their first demonic lives, Jaya-Vijaya were born as Hiranyakashipu and Hiranyaksha to sage