Chihilgazi (chihil;<challix, Persian word i.e. forty, gazi victorious Islamic militant) forty militant Muslim preachers. Nothing definitive is known about them, neither about the holy wars they fought nor the opponents they defeated. It is also not definite that there were actually 40 of them. According to local lore, they were Muslim saints and preachers of Islam who saved the common people from oppressive kings. Chihil Gazi';s mosque ruins are located in Chihil Ghazi village, about 7 km north of Dinajpur town.

The mazar stands by the side of the mosque. Of the three inscriptions commemorating the erection of the mosque only one has survived, and is now preserved in Dinajpur Museum. The stone inscription records the date of its construction as 16 Safar, 865 AH (1 December 1460 AD) during the reign of Sultan ruknuddin barbak shah (1459-1474), whose wazir Ikrar Khan, ordered the construction of the mosque. Ulugh Nusrat Khan, the faujdar and jangdar of Jor (Purnia) and Barur (Dinajpur) pargana built it. Jainuddin Bagdadi, a Muslim Sufi saint from Iraq, was the leader of these militant Muslim preachers.

According to the stone inscription, Chihil Gazi came to Bengal in between 13-14 century AD. [Dewan Nurul Anwar Hussain Choudhury]