Badami, formerly known as Vātāpi [Sanskrit: from āpi, ‘friend, ally’; ‘having the wind (vāta) as an ally’] (Kannada script: ವಾತಾಪಿ), is a town and headquarters of a taluk by the same name, in the Bagalkot district of Karnataka, India. It was the regal capital of the Badami Chalukyas from 540 to 757. It is famous for its rock cut monuments such as the Badami cave temples, as well as the structural temples such as the Bhutanatha temples, Badami Shivalaya and Jambulingesvara Temple. It is located in a ravine at the foot of a rugged, red sandstone outcrop that surrounds Agastya lake. Badami has been selected as one of the heritage cities for HRIDAY - Heritage City Development and Augmentation Yojana scheme of Government of India. History Pre-historic and epic The Badami region was settled in pre-historic times, as is evidenced by megalithic dolmens. In the local tradition, the town of Badami is linked to the Agastya legend of the epics. In the Mahabharata, the asura Vatapi would become a goat, be cooked by his brother Ilvala, and be eaten. Following this, he would recollect in the stomach and tear himself out from the inside of the victim, killing the victim. When the sage Agastya arrives, Ilvala offers the goat to him. However, Agastya, who is known for his enormous powers of ingestion and digestion, kills Vatapi by digesting the meal and giving Vatapi no time to recollect. Agastya thus kills the demons Vatapi and Ilvala. This legend is believed to have played out near Badami, hence the names Vatapi and Agasthya lake. History Pulakeshin I an early ruler of the Chalukyas, is generally regarded as having founded the Badami Chalukya dynasty in 540. An inscription record of this king engraved on a boulder in Badami records the fortification of the hill above 'Vatapi' in 544. Pulakeshin's choice of this location for his capital was likely due to strategic considerations, as Badami is protected on three sides by rugged sandstone cliffs. His sons Kirtivarman I and his brother Mangalesha constructed the cave temples located there. The Agastya lake (formerly Vatapi lake) is a man-made lake, a water infrastructure project completed in the 7th century, likely as a strategic source of water for the capital and around which many Hindu temples were constructed. Kirtivarman I strengthened Vatapi and had three sons, Pulakeshin II, Vishnuvardhana and Buddhavarasa, who were minors at the time