Quetta was captured by Mehmood Ghaznavi in the 11th century. The Khans of Kalat ruled Quetta until 1556 when the Persians conquered the city, only to have it retaken by Mughal Emperor Akbar in 1595. Despite all this, the Khans of Kalat were successful in restoring their rule in the region by the 18th century.