The Turks took Ghazni in 1173, then retreated back to their homelands.
At the end of the 12th century, the Turks  Sultan Mohammed of Ghur and his Mameluke (slave) General Qutb-ud-din Aybak seized Ghazni in 1173 and invaded India.