VOC arrival off Surabaya Ĭornelis Speelman, the VOC commander in Java's north coast, who led the attack on Surabaya. They agreed to a contract in February, which was ratified by the king in March. On 20 January 1677, Admiral Cornelis Speelman, recently named commander of the VOC's forces in Java's north coast, arrived in Jepara to negotiate with Wangsadipara, the Mataram governor of the north coast.
Facing the imminent collapse of his authority, the Mataram King Amangkurat I sought help from the VOC in Batavia. The rebels continued to win victories and gain territories in the following month, taking most of the northern coast of Java as far west as Cirebon. Mataram sent a much larger army to suppress them, but Trunajaya's forces routed this army at the Battle of Gegodog. In 1676, a rebel army of 9,000 invaded Java from their base in Madura and shortly after took Surabaya, the principal city of eastern Java. The Trunajaya rebellion began in 1674 as rebel forces conducted raids against the cities of the Mataram Sultanate.