After struggle among the remaining Ghuri leaders, Khwarizmi took over the Ghurid Sultanate in about 1215. Though the Ghurid's empire was short, and after them Timurids took over the Ghurid empire. Mu'izz's laid the foundations of Muslim rule in India. Qutbu l-Din Aibak, a former slave (Mamluk) of Mu'izz, was the first Sultan of Delhi.