The fort was built in stages between the 11th and 13th centuries by the dynastic rulers of the region including the Chalukyas and Hoysalas, later the Nayakas of Chitradurga of the Vijayanagar Empire. The Nayakas of Chitradurga, or Palegar Nayakas, were most responsible for the expansion of the fort between the 15th and 18th centuries. The fort was taken over for a short while by Hyder Ali at Chitradurga in 1779. The fort was captured by the British forces twenty years later, when they defeated his son Tipu Sultan. The fort is built in a series of seven concentric fortification walls with various passages, a citadel, masjid, warehouses for grains and oil, water reservoirs and ancient temples. There are 18 temples in the upper fort and one huge temple in the lower fort. Among these temples, the oldest and most interesting is the Hidimbeshwara temple. The masjid was an addition during Hyder Ali's rule. The fort's many interconnecting tanks were used to harvest rainwater, and the fort was said to never suffer from a water shortage.