The sultan, who had hitherto shown himself anxious to maintain a good understanding with the Dutch, and consented to their enjoying a free trade to the different parts of Java, with permission to establish a factory at Japára, is represented as having acted upon their advice in the present juncture, in marching to the eastward in person with his whole forces; but they no sooner saw him undertake the expedition, than availing themselves of the opportunity, they took possession of Jákatra.
He immediately sent two armies against them, under the command of Tumúnggung Wíra Kusúma, and a battle ensued, in which the Javan chief, with about ten thousand of his followers, were either slain or drowned in the river Chilúang. Tumúnggung Náta Jawána coming up afterwards, collected the fugitives, and joining them with his forces surrounded the town. He posted troops on all the roads towards the south and west, at the distance of cannon-shot from the town, at the same time cutting channels to lead off the streams by which the Dutch were supplied. After an unsuccessful attack made by the chiefs Mandúra Réja and Wíla Tíkta, for which they were put to death by their commander, a sally was made on the part of the besieged with so much success, that Tumúnggung Jawána determined to break up with his army, and no further attempt against the Dutch was made until the year 1629, A.D.
"In this year a second army from Matárem, composed of Javans and Madurese, appeared before Batavia. The siege lasted for a considerable time, and the assaults on the town and fort, as well as the sallies of the besieged, were very bloody. Anxious to know the fate of his army, the sultan dispatched his uncle, Pangéran Purbáya, to Batavia, to obtain information. This chief having destroyed the Dutch factory at Japára, embarked in a swift sailing práhu of the size of the trunk of the largest teak tree, which when seen at a distance looked like a serpent on the sea. On reaching the bay of Batavia, Purbáya perceived three ships at anchor. Two of them, after firing upon him, were sunk, and notwithstanding the fire from the third he brought his práhu safe up to Jákatra, when he was fired upon from the fort. On this Purbáya with three followers landed from the práhu, and passing like a shadow to the Dutch fort, which he touched with his hands, proceeded on to the Javan lines, where he informed them that he had come by order of the sultan, to give them a proof how near they might approach the Dutch fort. He then hastened back to Matárem and reported the disastrous state of the war, on which the sultan withdrew his forces to Kaliwúngu."
The Dutch sent an ambassador with rich presents, and the war ended in the Javan year 1551.
During the latter part of this prince's reign the country appears to have enjoyed tranquillity, the only two occasions in which it was disturbed being the revolt of the chiefs of Balambángan and Súmedang, which may be considered as the extreme points of the Matárem dominion, Jákatra and Bántam having been effectually separated from them.
Sultan Agung is represented, even by the Dutch, as a well informed and enlightened prince. He extended his dominion not only over all Java and Madúra, but carried his conquests to Lándak and other states on Borneo. He died in the Javan year 1568, and was succeeded by his son, Pangéran Aria Prábu, or Aria Matárem, then twenty-six years of age.
This prince, on account of his mother being a princess of Chéribon, succeeded, to the prejudice of his elder brother: he held his court at Pléret, and is represented as the most severe and tyrannical of Javan sovereigns. During a visit made by the chief of Chéribon to Matárem, he received the distinction of Abdul Ráchman Sakiden, in addition to the title of Susúnan Amangkúrat Senapáti Ingalága, which he had assumed on his accession. On this occasion it is stated, that he again conferred on the sultan of Chéribon all the eastern districts of the island to the westward of Túgu, the supposed limit of the Majapáhit empire, that is to say the districts of Brébes, Tegál, Pamálang, Ulujámi, Wiradésa, Pakalóng'an, Bátang, Kendál, and Kaliwúngu. The Dutch had already firmly established their capital at Batavia, and secured an influence in many of the former dependencies of Java, particularly at Sukadána on Borneo and Palembang on Sumatra.
During the troubled reign of this prince, the Dutch appear first to have entered into a written agreement with the acknowledged sovereigns of Java. A treaty was ratified at Batavia in the second year after his accession, on the 24th September 1646, the conditions of which were that the Susuhúnan should be informed annually, by an ambassador, of the nature of the curiosities which had arrived from Europe; that all priests, or other persons, whom he might be desirous of sending to foreign countries, should be conveyed thither in the Company's ships; that all persons who should desert to either country, for the purpose of evading their debts, should be given up; that the Company and the Susuhúnan should assist each other against their common enemies; that the vessels of the Susuhúnan's subjects should be allowed to trade to all places under the Company's authority, except Ambon, Banda, and Ternáté, and that those bound to Malácca, or places situated to the northward of that settlement, should be obliged to touch at Batavia and to apply for passes.
A treaty was also entered into on the 10th July 1659, between the Dutch and the sultan of Bantam, through the mediation of the ambassadors of the Pangéran of Jámbi, in which it was stipulated, that all prisoners of war and deserters should be mutually restored, with the exception, on the part of the sultan, of those who had embraced the Mahomedan faith more than three months previous to that date, those who had submitted to circumcision since that date to be sent back, or if slaves and unwilling to return, the sultan to pay the value of them to their masters: that the Dutch should, as heretofore, have a permanent residence at Bantam, for which purpose the same building was to be given which they had occupied before the war, free of rent, and this building to be secured, at the sultan's expense, against any hostile attempts: that the river of Untung Jáwa should form the boundary of the Bantam territory.
Certain provisions were made also to prevent illicit trading.