in mid-1677. The king escaped to the north coast with his eldest son, the future king Amangkurat II, leaving his younger son Pangeran Puger in Mataram. Apparently more interested in profit and revenge than in running a struggling empire, the rebel Trunajaya looted the court and withdrew to his stronghold in Kediri, East Java, leaving Prince Puger in control of a weak court. Seizing this opportunity, Puger assumed the throne in the ruins of Plered with the title Susuhanan ing Alaga. Amangkurat II and the beginning of foreign involvement On his way to Batavia to ask for Dutch's help, Amangkurat I died in the village of Tegalarum near Tegal just after his expulsion, making Amangkurat II king in 1677. He too was nearly helpless, having fled without an army nor treasury to build one. In an attempt to regain his kingdom, he made substantial concessions to the Dutch East India Company (VOC), who then went to war to reinstate him. He promised to give the VOC the port town of Semarang if they lend him some troops. For the Dutch, a stable Mataram empire that was deeply indebted to them would help ensure continued trade on favourable terms. They were willing to lend their military might to keep the kingdom together. The multinational Dutch forces, consisting of light-armed troops from Makasar and Ambon, in addition to heavily equipped European soldiers, first defeated Trunajaya in Kediri in November 1678 and Trunajaya himself was captured in 1679 near Ngantang west of Malang, then in 1681, the alliance of the VOC and Amangkurat II forced Susuhunan ing Alaga (Puger) to relinquish the throne in favour of his elder brother Amangkurat II. In 1680, Amangkurat II ascended as the king of Mataram by receiving his crown from the Dutch. As the compensation for Dutch supports, other than Semarang, Mataram has to hand over Bogor, Karawang and Priangan to the VOC. Cirebon too was forced to shift allegiance from Mataram to the Dutch, and becomes Dutch's protectorate state. Since the fallen Plered was considered inauspicious, Amangkurat II move the capital to Kartasura in the land of Pajang (northern part of the stretch of land between Mount Merapi and Mount Lawu, the southern part being Mataram). The Dutch also erected a fort in Kartasura in an effort to control as well as protect the new capital. By providing help in regaining his throne, the Dutch brought