Anahilla was a son of the Chahamana king Mahindu. His brother Ashvapala succeeded Mahindu. Ashvapala's son Ahila probably died heirless, because of which Anahilla became the next king.
According to the Sundha Hill inscription, Anahilla defeated Bhima, capturedShakambhari, killed Bhoja's general Sadha, and defeated the Turushkas. Bhima, the Chaulukya king ofGujarat, was a southern neighbour of the Chahamanas. According to the Chahamana record, Anahilla's father Ahila had also defeated Bhima. It is not clear when and how Anahilla took control of Shakambhari, which was the capital of the Chahamanas of Shakambhari. According to the epic poemPrithvirajaVijaya, the Paramara king Bhoja killed the Shakambhari Chahamana king Viryarama. Historian Dasharatha Sharma theorizes that the Paramaras occupied Shakambhari after Viryarama's death, and were evicted by his successor Chamundaraja with help from Anahilla. On the other hand, R. B. Singh speculates that Anahilla and Bhoja formed an alliance against Viryarama; sometime later, the alliance broke, and Anahilla killed Bhoja's general Sadha. The Turushkas can be identified with the Muslim Ghaznavids. The Ghaznavid ruler Mahmud invaded India around 1025 CE, and raided the SomanathHindu temple. According to the 16th-century historian Firishta, some Hindu kings including Param Dev assembled a large army to attack him during his return journey. However, Mahmud chose to avoid a conflict, and returned using a different route. R. B. Singh theorizes that Anahilla was a part of the confederacy that planned to fight with Mahmud. The Chahamana claim of Anahilla having defeated the Turushkas probably refers to this event. On the other hand, Dasharatha Sharma speculates that the Ghaznavid army passed through Nadol on its way to Somanath; Anahilla defended Naddula by fighting with Mahmud or one of his generals. According to an inscription, the Naddula Chahamana kingdom comprised only 700 villages at the time of Anahilla's ascension. He increased this number to 7,000 by killing the neighbouring rulers. While this may be an exaggeration, it indicates that Anahilla was one of the most successful rulers of his dynasty. Anahilla was succeeded by his elder son Balaprasada, who was succeeded by his younger son Jendraraja.