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 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 ascends 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 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.