The first authentic historical event connected with it, however, was its capture by Qutb-ud-din Aibak in 1196, after which it became a very important post on the northern frontier of the Delhi empire. In 1223, a mosque of imposing size, crowned with a dome, was built. In the 13th century two of its governors, Shams-ud-din Iltutmish, the builder of the mosque referred above, and his son Rukn ud din Firuz, attained the imperial throne.