In response to Mataram's request for intervention, VOC dispatched a large fleet containing Indonesian and European forces, commanded by Admiral Cornelis Speelman.
In April 1677 the fleet sailed to Surabaya, where Trunajaya was based.
After negotiations failed, Speelman's forces stormed Surabaya and took it after hard fighting.
The troops proceeded to clear the rebels from the area surrounding Surabaya.
VOC forces also took Madura, Trunajaya's native island, and laid his residence there in ruin.
Trunajaya fled Surabaya and established his capital in Kediri.

Although the rebels were defeated in Surabaya, rebel forces campaigning in the interior of Central and East Java had more success.
The rebel campaign culminated in the fall of the capital Plered in June 1677.
The king was ill, and distrust among the royal princes prevented organized resistance.
The king fled west with the crown prince and his retinue, allowing the rebels to enter and plunder the capital with little fighting.
The rebels then withdrew to Kediri, taking the royal treasury with them.
In response to Mataram's request for intervention, VOC dispatched a large fleet containing Indonesian and European forces, commanded by Admiral Cornelis Speelman. In April 1677 the fleet sailed to Surabaya, where Trunajaya was based. After negotiations failed, Speelman's forces stormed Surabaya and took it after hard fighting. The troops proceeded to clear the rebels from the area surrounding Surabaya. VOC forces also took Madura, Trunajaya's native island, and laid his residence there in ruin. Trunajaya fled Surabaya and established his capital in Kediri.
Although the rebels were defeated in Surabaya, rebel forces campaigning in the interior of Central and East Java had more success. The rebel campaign culminated in the fall of the capital Plered in June 1677. The king was ill, and distrust among the royal princes prevented organized resistance. The king fled west with the crown prince and his retinue, allowing the rebels to enter and plunder the capital with little fighting. The rebels then withdrew to Kediri, taking the royal treasury with them.
Trunajaya rebellion