After the death of Gujarat Sultan Qutb-ud-dín Ahmad Shah II, the nobles raised his uncle Daud, son of Ahmad Shah I to the throne. He reigned over the Gujarat Sultanate from few days in 1458 CE.
Barani was a contemporary of Muhammad bin Tughlaq and Firuz Shah Tughlaq both. He wrote a number of renowned texts, such as the Fatwa-i-Jahandari, which elaborates on the principles to be followed by Muslim rulers to attain merit.