During its peak, the Mataram Kingdom fell into the hands of Mataram, as well as the Kingdom of Majapahit. The government moved to Demak as Islam was introduced, brought by the Wali Songo. The government was then under the reign of Duke Ronggo Tohjiwo. In the time of the collapse, according to folklore, legendary heroes appeared against Raden Panji Pulongjiwo. He was caught by Mataram soldiers in the village now called Kepanjen Panggungrejo (Kepanji's). The destruction of the town was known as Malang Kutho Bedhah.