In the year 1490, the chief of Pájang, from religious motives, paid a visit to Súnan Gíri, accompanied by Kiái Gédé Matárem, and a numerous retinue of chiefs and priests. He was mounted on an elephant, and assumed all the pomp which had been customary with the sultans of Bintára. On this occasion he was formally installed as sultan, in the presence of the chiefs of the eastern provinces. The Súnan Gíri, at the same time, noticing Kiái Gédé Matárem, and being informed of his descent, declared that his family would one day rule all Java, and urged the Sultan of Pájang to protect and befriend him. It was during this visit that the Sultan of Pájang gave orders for digging the extensive fish-ponds which are now preserved at Grésik for the Ikan Bándang.
On the return of Kiái Gédé Matárem to his capital, he called together his relations, and recommended to their kindness the forty friends who had accompanied him on his first coming to Matárem, and their descendants, enjoining them, on no account whatever, to shed their blood, whatever crime they might commit, but if necessary, to punish them in some other way. To this they most solemnly bound themselves; and from this period, strangling is said to have been introduced as a capital punishment among the Javans.
His son, now called Mas Anghebái Súta Wijáya, had an amour with the grand-daughter of Sheik Wáli ben Húsen, who was intended to become one of the concubines of Sultan Pájang. Upon her becoming pregnant, he fled first to Chéribon, where he implored protection from the Sultan, but to no purpose, and afterwards towards Luánu, where collecting the rabble of the country, he commenced hostilities against the chief. The Sultan of Pájang, however, at length offering him a pardon, on condition of his marrying the girl, he returned, and was again received into favour; but not before he had reduced the chief of Luánu to submission, and rendered that province tributary to Matárem.
The chiefs of Surabáya, Grésik, Sidáyu, Túban, Wirasába, Pranarága, Kedíri, Mádion, Blóra, Jípang, and Pasurúan, declared themselves independent of the prince of Madúra, and elected Pánji Wíría Kráma, the Adipáti of Surabáya, who acted as Widána to Sultan Pájang, to be their chief. About the same time, Sánta Gúná, the chief of east Balambángan, with the assistance of auxiliaries from Báli and Celebes, again reduced the western districts of that province under his authority, subduing the principality of Panarúkan and expelling the prince and his followers.
Kiái Gédé Matárem died in the year 1497, after having, by his mild and equitable administration, converted the province of Matárem, from a wilderness into a fertile and populous country, and induced many of the surrounding districts voluntarily to submit to his authority.
The relations of the deceased appearing at the court of the Sultan of Pájang, he appointed his son, Anghebái Súta Wijáya, to succeed him as chief of Matárem, conferring upon him, at the same time, the command of all the troops of the empire, under the title of Kiái Gédé Agung Senapáti Ingalága, commonly distinguished by the single title of Senapáti, enjoining him annually to present himself at his court on the feast of Múlut.
It is noticed, that at this period the island was frequented by Portuguese and other European navigators, who had established factories at Bantam.
The ambition of the court of Matárem being kept alive by various predictions, dreams, and enchantments, by which Senapàti was promised the assistance of Kiái Gédé Laut Kidúl the goddess of the great South Sea, who declared herself wedded to him, he was instigated to build an extensive kráton on the spot where his dálam then stood.
He now placed guards at the limits of his territories, burnt some of the adjacent villages, and assumed an attitude of complete independence, subjecting by degrees many of the neighbouring districts. Ambassadors were immediately sent from Pájang to demand an explanation. They were in the first instance duped by the flattering manner in which they were received; but afterwards discovering the real state of affairs, and reporting it to the Sultan their master, he is represented as having called his son before him, and having said, "the will of Providence rules all events. Senapáti will not, during my life, commence hostilities against me, but after my death he will render you subject to him. Yield to his power, on which depends your happiness and that of your descendants." At length, however, the chiefs of Túban and Demák, apprehensive of the growing power of Matárem, prevailed upon him first to banish the Tumung'gung Pájang, as the instigator of this feud, and afterwards to send a considerable force against Matárem. The Tumung'gung, however, was rescued by forty chosen men dispatched by Senapáti, and a stratagem induced the forces of Pájang to retreat. The Pájang forces consisted of five thousand men, commanded by the Sultan's son: those of Senapáti did not exceed eight hundred. The latter seeing that it was rash to risk an engagement against such a superiority of numbers, particularly as the few troops he had raised on the emergency were altogether unexperienced and undisciplined, while those of Pajáng were in the highest order, halted at a short distance from Brambánan, where the enemy's forces were encamped. During the night he burned all the villages in the vicinity, and set fire to the reeds and long grass at some distance from Brambánan, and to the rear of the enemy's camp, by which means he persuaded them that the Matárem forces had taken their departure, in order to obtain Pájang by surprize.
During the succeeding night there was a heavy thunder storm, and on the following morning the mountain Merbábu burst with a dreadful explosion, throwing out ashes and large stones; the rivers overflowed their banks and inundated the low country, occasioning great confusion and destruction in the Pájang camp, and inducing the commander to retreat with his army forthwith to Pájang. Halting at the village Tumpáit, situated near Kárbu Súru, he visited the tomb of the Pangéran of that name, who was descended from Abdálah, the eldest son of Ráden Pátah. Here the sultan is said to have been informed of a prophecy which foretold the immediate downfall of Pájang, and to have fainted and fallen from his elephant in consequence.