Upon taking the throne , Agung 's son Susuhunan Amangkurat I tried to bring long-term stability to Mataram 's realm , by murdering local leaders that were insufficiently deferential to him , including the still-powerful noble from Surabaya , Pangeran Pekik , his father-in-law , and executed Panembahan Adiningkusuma ( posthumous : Panembahan Girilaya ) , king of Cirebon , his son in-law . He also had closing ports and destroying ships in Javanese coastal cities to prevent them from getting too powerful from their wealth . This action devastated Javanese coastal economy and has crippled Javanese maritime prowess that has been nurtured since Singhasari and Majapahit era , thus making Mataram mainly as an agricultural inland kingdom for centuries to come . Because of this deeds , Amangkurat I was notorious as a ruthless king . He even massacred 5,000-6,000 ulema and their family members due to their alleged involvement in a coup plot . Despite his political ruthlessness , unlike his father , Amangkurat I was not an accomplished military leader and dare not to pursue confrontation against the Dutch , as in 1646 he signed peace agreement with them . To further his glory , the new king abandoned Karta , Sultan Agung 's capital , and moved to a grander red-brick palace in Plered ( formerly the palace was built of wood )
massacred
Massacre of ulema by Amangkurat I
Mataram Sultanate