according to jain scholar balbhadra jain's compendium of digambar jain shrines in india, the temple was constructed during the reign of the mughal emperor shah jahan. balbhadra jain states that a jain officer of the mughal army is said to have kept a tirthankara statue in his tent for personal worship. the tent gradually started attracting other jain army officers, and subsequently, a jain temple was constructed at the site in 1656. at that time, the temple was also known as "urdu temple" (because it was located in an area called "urdu bazaar") and "lashkari mandir" ("laskhar" means an army camp). balbhadra jain also mentions that there are several legends about the temple. one such legend claims that shah jahan's successor aurangzeb once ordered a ban on all musical instruments in the temple. however, miraculously, sounds of drums (nagadas) would be heard emanating from the temple despite inspections from the mughal officers. aurganzeb himself visited the temple to see the miracle, and finally, lifted the ban.