As the center of the Banjar Kingdom, Martapura is known to have witnessed the reign of 12 sultans. During this period, the mosque served as a place of worship, a place for Islamic preaching, a place for Muslim integration, and a base or defensive fortress for fighters challenging the Dutch. The burning of Pasayangan Village and the Martapura Mosque sparked the desire to build a larger mosque. Construction began in 1280 Hijri (1863 CE).