Photograph of the sculpture of Varaha and Prithvi, with an inscription from Cave 3 at Badami, taken by James Burgess in 1874. Badami, formerly known as Vatapi, was the capital of the early Chalukya rulers in the 6th - 8th centuries. The town is situated between two rocky hills of red sandstone that surround an artificial lake. There are two later forts that overlook the town. Around the south fort there are four rock-cut shrines while structural temples dominate the site on the opposite north fort. Cave 3 was excavated during the reign of the early Chalukya ruler Pulakeshin I in 578 and it is the finest of the caves of Badami. It has an elaborate sculptural ornamentation and consists of a square sanctuary excavated into the rear wall of a large columned mandapa or hall approached through a long outer porch. Large figurative panels in high relief are carved at the end of the porch. One of the side panels represents Vishnu under the form of Varaha, the Boar, that rescues Prithvi, the Earth, which had been dragged into the waters by a demon.