According to an inscription (now preserved in the Bangladesh National Museum), the mosque was constructed between 1610 and 1611 during the reign of Emperor Jahangir by Sayeed Khan Panni, son of Baizid Khan Panni, in honour of Shah Baba Kashmiri. Shah Baba Kashmiri was a prominent Sufi saint of Bengal based in this area.[2]