The Khalji dynasty was of Turko-Afghan heritage. They were originally of Turkic origin. They had long been settled in present-day Afghanistan before proceeding to Delhi in India. The name "Khalji" refers to an Afghan town known as Qalati Khalji ("Fort of Ghilji"). They were treated by others as Afghan due to adoption of some Afghan habits and customs. As a result of this, the dynasty is referred to as "Turko-Afghan". The dynasty later also had Indian ancestry, through Jhatyapali (daughter of Ramachandra of Devagiri), wife of Alauddin Khalji and mother of Shihabuddin Omar.