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.
Babur first established himself in Kabul in 1504 A.D. and then pushed steadily southward into India from Afghanistanthrough the Khyber Pass. Later he successfully captured Bhira, Sialkot, and Lahore in Punjab.