During the time of Ibn Batutta, all visitors to Delhi coming from North,will have to undergo a routine check-up and wait at Multan till the Sultan from Delhi summoned them. At the time Delhi was under the rule of the Tughlaq Dynasty with Muhammad bin Tughluq as the Sultan. Ibn Battuta stayed on in the city for over two months.
After a long wait Ibn Battuta finally met the sultan and was appointed the Qadi by the Sultan. He spent several years in Delhi performing his functions as the Qadi.