During the medieval period from the 8th to the 18th century, the Indian subcontinent was divided into various provinces, each ruled by different leaders. The region was known for its wealth, attracting numerous invaders. However, natural barriers made invasions challenging; the Himalayas protected the north, while seas surrounded the other sides. Invaders without naval power could only access the subcontinent through mountainous passes in northwest India. The first significant invasion occurred in the 8th century when the Arab general Muhammad bin Qasim entered through these passes, eventually defeating King Dahir of Sindh. In the 11th century, the Turks, with Sultan Mahmud of Ghazni leading multiple invasions, targeted India’s temples, renowned for their accumulated wealth. Following the Turks, Muhammad Ghori's incursions in the late 12th century marked another chapter. After an initial defeat by Prithvi Raj Chauhan, Ghori returned and ultimately defeated him at the Second Battle of Tarain. Ghori’s territories were managed by his general, Qutb al-Din Aibak, a former slave who rose to power and became the Sultan of the region after Ghori's death. This era saw a succession of rulers who were often former slaves, illustrating a dramatic shift in social and political structure. Notable sultans emerged, including Balban and Alauddin Khilji, highlighting the complex history of invasions and governance in medieval India.