The Ampel Mosque in Surabaya is an important historical site for Muslims in Indonesia. The architecture of the Ampel mosque is strongly influenced by Javanese and Arabic culture. a very harmonious integration between Javanese architecture as a form of authenticity and local wisdom in buildings, while Arabic architecture as a complementary and additional component. This research was, therefore, conducted to optimize the maintenance factor in the mosque building to ensure it functions properly and sustainably towards serving as a historic worship place for future generations. Data were collected using questionnaires distributed to the congregants or users of the mosques and analyzed through optimization using a dynamic program based on the level of importance. The results showed seven maintenance factors including the complexity of construction and design, serviceability, building durability, security and safety, aesthetics of the building, user comfort, and maintenance capability. Moreover, the optimization process prioritized the ease in construction work, stability of the construction, durability against structural damage to the building, use of non-hazardous materials, aesthetics of the building, the comfort of indoor and outdoor spaces, and ease of maintenance. These are expected to be the focus of the mosque manager in maintaining the authenticity of the building components. This, therefore, means the Ampel Mosque building can be maintained as a religious tourism destination at the national and international levels in order to ensure its historical value is sustained while the local and national economy is improved.