During the 12th century, the invader Muhammad of Ghor's advancing forces captured Ghazni, Multan, Sindh, Lahore, and Delhi, and one of his generals Qutb-ud-din Aybak proclaimed himself Sultan of Delhi and established the first dynasty of the Delhi Sultanate. By the mid-12th century, Ikhtiar Uddin Muhammad bin Bakhtiar Khilji, one of the generals of Qutb-ud-din Aybak, invaded Bihar and Bengal, and Patna became a part of the Delhi Sultanate. He is said to have destroyed many ancient seats of learning, the most prominent being the Nalanda University near Rajgrih, about 120 km from Patna. Patna, which had already lost its stature as the political centre of India, lost its prestige as the educational and cultural center of India as well.