The Dutch agreed, since for them, a stable Mataram empire that was deeply indebted to them would help ensure continued trade on favourable terms. The multinational Dutch forces, consisting of light-armed troops from Makassar and Ambon, in addition to heavily equipped European soldiers, first defeated Trunajaya in Kediri in November 1678. Trunajaya himself was captured in 1679 near Ngantang west of Malang.