Several Islamic kingdoms (sultanates) under both foreign and, newly converted, Rajput rulers were established across the north western subcontinent (Afghanistan and Pakistan) over a period of a few centuries.