Penembahan Senopati at a young named Sutowijoyo ruled Mataram in 1585 until 1601. In 1601 the title of Raden Mas Jolang with his title Susuhunan Hadi prabu Hanyakrawati replace Mataram kings until the year 1913. After His King Hanyakrawati Hadi dies, succeeded by Sultan Agung Hanyakrakusuma, who ruled from the year 1613 until the year 1945. At the time of the reign of Sultan Agung, Mataram kingdom was in the height of glory. Because many kings were conquered by him, the kings of the North coast of Central Java and East Java, West Kalimantan, Surabaya Madura and Cirebon.
Sultan Agung is the king of a religious figure and is not happy in the Netherlands who are in the land of Java. Sultan Agung, aspires to rule the whole of the island of Java, but failed ideals. Because at that time there were three political forces, namely Mataram, Banten and VOC in Batavia. The displeasure of the Sultan Agung in the Netherlands we can see when Sultan Agung attacked VOC in Batavia for 2 times, as the center of the Dutch in Java. But the attempt failed due to the outbreak of disease and lack of food because barns are burned by the Dutch. As a courtesy of the then Sultan Agung Indonesian government awarded as one of the national heroes who tried to expel the invaders from the land of Indonesia.
In the reign of Sultan Agung Hanyakrakusuma, he was a lot of economic and political relations with other regions. Evidence of cooperation in the economic field is Palembang and Jambi rely rice needs of Mataram, caused people in Palembang and Jambi plant pepper rather than rice. Mataram in 1641 to establish a relationship with the Portuguese in Malacca and Mataram send rice to the Portuguese in Malacca, while the Portuguese in Malacca provide the required clothing and necessities of war. Evidence of cooperation in the field of politics is to give protection to Palembang and Jambi to avoid expansion of Banten and Aceh. Protection was ended in 1642, when the fleet was destroyed by a fleet VOC Mataram in Palembang. Even Sultan Agung Hanyakrakususma also a relationship with the center of Islam in Mecca, thanks to the relationship he obtained the title of Sultan.