Penembahan Senopati had young named was Sutowijoyo as king of Mataram kingdom from 1585 until 1601. Raden Mas Jolang with his title Susuhunan Hadi Prabu Hanyakrawati replaced Mataram kingdom until the year of 1913. After king Hanyakrawati Hadi dies, succeeded by Sultan Agung Hanyakrakusuma, who ruled from the year 1613 until 1645. When Sultan Agung had ruled, Mataram kingdom was in the height of glory. Because many kingdoms were conquered by him, the kings of the north coast of Central Java and East Java, West Kalimantan, Surabaya Madura, and Cirebon.
Sultan Agung was a religious figure person and he was so not happy with the Netherlands troops, who colonized Java Island. Sultan Agung aspires to rule the whole of Java but failed. Because there were 3 political forces, namely Mataram, Banten and VOC in Batavia by the time. The displeasure of Sultan Agung in the Netherlands, that can see when Sultan Agung attacked VOC in Batavia for 2 times, as the center of the Dutch power in Java Island. But the attempt was failed due to the outbreak of disease and lack of food because the barn was burned by the Dutch. As a courtesy, then Sultan Agung Indonesian government awarded as one of the national heroes who tried to expel invaders from Indonesia.
In the reign of Sultan Agung Hanyakrakusuma, he was smart to organize controlled economic and political relations with other regions. Evidence of cooperation of economic field is Palembang and Jambi rely upon rice needs of Mataram, caused people in Palembang and Jambi planted pepper rather than rice. Mataram kingdom established a relationship with the Portuguese in Malacca in the year 1641. Mataram kingdom sent rice to Portuguese in Malacca, while Portuguese in Malacca provide the required clothing and necessities of war. Evidence of cooperation politics was given protection to Palembang and Jambi to avoid expansion of Banten and Aceh. Protection was ended in the year of 1642 and it was destroyed by VOC in Palembang.