The Chandela Rajput clan ruled Bundelkhand from the 10th to the 16th centuries. In the early 10th century they were feudatories of the Pratiharas of Kannauj, and ruled from the fortress-city of Kalinjar. A dynastic struggle among the Pratiharas from 912 to 914 allowed the Chandelas and other feudatories to assert their independence. The Chandelas captured the strategic fortress of Gwalior c. 950. Dhanga (c. 950–1008) left many inscriptions, and endowed a large number of Jain and Hindu temples. Dhanga’s grandson Vidyadhara (1017–29) expanded the Chandela kingdom to its greatest extent, extending the Chandela dominions to the Chambal river in the northwest and south to theNarmada River. The Afghan king Mahmud of Ghazni attacked the Chandela dominions during Vidydhara’s reign, but did not retain any Chandela territory. The Chandelas built the famous temple-city of Khajuraho between the mid-10th and mid-11th centuries. During the Chandela period, Bundelkhand was home to a flourishing Jain community and numerous Jain temples were built in that period.