This mosque has an inscription stating that the mosque was built in two stages. The first stage, built during the reign of Sultan Agung, only consisted of the core of the mosque, which was small in size and therefore called a langgar at that time. The second stage of the mosque was built by the King of Kasunanan Surakarta, Paku Buwono X. The difference between the parts of the mosque built by Sultan Agung and Paku Buwono X is in the pillars. The part built by Sultan Agung was made of wood, while the one built by Paku Buwono was made of iron.