The king Prithviraj Chauhan was defeated in 1192 by Muhammad Ghori in the second battle of Tarain, an invader from Afghanistan, who made a concerted effort to conquer northern India. Qutb-ud-din Aibak, was given the responsibility of governing the conquered territories of India until Ghori returned to his capital, Ghor. When Ghori died without an heir in 1206 CE,  Qutb-ud-din assumed control of Ghori's Indian possessions, and laid the foundation of the Delhi Sultanate and the Mamluk dynasty. He began construction of the Qutb Minar and Quwwat-al-Islam (Might of Islam) mosque, the earliest extant mosque in India. It was his successor, Iltutmish (1211–1236), who consolidated the Turkic conquest of northern India. Razia Sultan, daughter of Iltutmish, succeeded him as the Sultan of Delhi. She was the first and only woman to rule over Delhi prior to the British Raj.