He was then sold to other VOC officials until he was eventually bought by edeleer Moor, which gave him the nickname "Untung" (lit.
[4] In prison, he became acquainted with Wirayuda and Kiai Ebun Jaladirya, who taught him Islam and formulated a plan against the Dutch.
in 1678, he then managed to flee to the mountainous area in the south of the city, in Udug-udug, Western Java, before moving to Cisero in 1679 and becoming a brigand.
Later on, Surapati was sent to meet with Pangeran Purbaya (another son of Ageng Tirtayasa) and his wife Raden Ayu Gusik Kusuma alongside fled to Gunung Gede and only wanted to surrender to a native VOC officer.
Buleleng later wrote to Surapati to report to him in Cirebon and explain his actions, writing the company might distrust Balinese, who had been favored compared to Buginese and Makassarese.
Meanwhile, in another letter, Tumenggung of Sukapura wrote to Samson and van Happel that he was awaiting orders to take up arms against Surapati's group.
Surapati continued to hesitate with good reason as runaway slaves still had to repay his purchase price to their former owner which in effect returned them to slavery.
An expedition from Batavia to Cirebon by sea was sent in September 1674 under Jacob Couper, consisting of 457 Dutch and 300 Indonesian soldiers.
On 24 September, Couper's expedition left Cirebon for Rajapolah, already forty Dutch soldiers fell ill and the heavy rain and marshy terrain made progress difficult.
The weather favoured the Dutch as the heavy rain stopped and they were able to use firearms killing about fifty to sixty of Surapati's men.
Dutch pursuit would be hampered by heavy rain that caused flooding rivers meanwhile Surapati and his followers would reach Bagelen and Banyumas.
Couper's expedition would be called off at this point because of the amount of sickness of his troops and he returned to Cirebon and met up with van Happel there.
[5] Banyumas-Bagelen area at this time was filled with former soldiers, freebooters, and mercenaries, primarily of Balinese and Makassarese who fought for the rebels in the Trunajaya rebellion.
Surapati would later be confronted by two Mataram forces, men from Wates and Kedu under Ngabeis Wiriwadigda, Wiramija, and Madaraka, as well as from Bagelen under the brothers Surayuda and Wira.
They entered into negotiation facilitated by Balinese who served the Sunan of Mataram, listed as Singabarong, Wangsanata, and Mangkuyuda.
[8] Surapati was quick to prove his usefulness and got to work immediately in defeating 400-man strong rebel bands in Kembang Kuning in Kedu in a fierce fight.
Surapati would later present Sunan Amangkurat II at Kartasura, the head of six rebel leaders, alongside 80 fighting men, 20 sick or otherwise disabled, 60 women and children, followed by Javanese force and a band of conquered enemies.
[3] Amangkurat did not intend to be dispossessed and in 1690 he sent an army that was then defeated by Surapati, whose mastery of military techniques was acquired from his experience in Dutch troops, which gave him an advantage over the Javanese.