In 1320, Tughluq dynasty of Delhi was overthrown by Ilyas Shah. Meanwhile, in 1321 Tughluq dynasty of Delhi was overthrown by Ilyas Shah. In 1322, Tughluq dynasty of Delhi was overthrown by Muhammad bin Tughluq. In 1325, he was assassinated and in 1327 the Delhi-based Tughluq dynasty was overthrown by the Afghan Dillizae Khalifa. In 1329, Tughluq dynasty of Delhi was overthrown by Tarmashirin, while in 1341, the Delhi-based Tughluq dynasty was overthrown by Mehmood Ghaznavi. In 1356, Ghaznavi's son, Ala ud-Din Ghazi, was defeated and killed by the Delhi-based Tughluq dynasty. In 1370, Ala ud-Din Ghazi's son, Muhammad bin Tughluq, was defeated and killed by the Delhi-based Tughluq dynasty.
Din Muhammad was a member of Chaghtai Khanate and his code of law is known as Hovayat-ul-Majalis, which was issued in Lahore on 10 Muharram 144; or according to , is a variant of the Yadavnameh-ul-Majalis, a law promulgated in 1315 by her grandson, Ayurjim, governor of Lahore under Jahangir. It is documented that he was commissioned by Khan Shahab ud-Din Qabacha of the Chagatai Khanate and was selected as the viceroy of the Khanate, from Vilayat-ul-Ulema ashrafiya; this is what makes him the \"patron saint of the legal scholars of Chaghatai\". In a poem, he is described as \"prin-dhi-am-i-narsh\" (protector of the tribes) of Lahore. While giving a diploma to author-banker Abu Hamid al-Ghazali, he is said to have remarked, \"You have presented the book to God, for He will help it in this world but not in the next\". 7211a4ac4a