The Ghurid dynasty (also spelled Ghorids; Persian: دودمان غوریان, romanized: Dudmân-e Ğurīyân; self-designation: شنسبانی, Šansabānī) was a culturally Persianate dynasty of eastern Iranian Tajik origin, which ruled from the 8th-century in the region of Ghor, and became an Empire from 1175 to 1215. The Ghurids were centered in the hills of the Ghor region in the present-day central Afghanistan, where they initially started out as local chiefs. They gradually converted to Sunni Islam after the conquest of Ghor by the Ghaznavid ruler Mahmud of Ghazni in 1011. The Ghurids eventually overran the Ghaznavids when Muhammad of Ghor seized Lahore and expelled the Ghaznavids from their last stronghold.
The Ghurids initially ruled as vassals of the Ghaznavids and later of the Seljuks. However, during the early 12th-century the long-standing rivalry between the Seljuks and Ghaznavids created a power vacuum in eastern Afghanistan and Panjab which the Ghurids took advantage of and began their territorial expansion. Ala al-Din Husayn ended the Ghurid subordination to the Ghaznavids, ruthlessly sacking their capital, although he was soon defeated by the Seljuks after he stopped paying tribute to them. The Seljuk imperial power, however, was itself swept away in eastern Iran with the contemporaneous advent of the Khwarazmian Empire.