Siege of Batavia Siege of Batavia is a military campaign led by Sultan Agung of Mataram to capture Dutch port - settlement of Batavia in Java . The first attempt was launched in 1628 , and the second in 1629 , both were unsuccessful . Jan Pieterszoon Coen , the Governor - General of the Dutch East Indies manage to repel the siege and beat off all Sultan Agung ' s attacks . Prelude . In Indonesian Archipelago the Dutch East Indies Company ( VOC ) first established their base in Ambon . To expand their trade network , the Dutch asked the permission of Sultanate of Mataram to build " loji " ( trading post , mostly consist of fort and warehouses ) on Java north coast . The Sultan of Mataram declined the request feared that the Dutch would control the economy of northern Java coast . After the Dutch wrestled the port of Jacatra ( Jayakarta ) from Sultanate of Banten , they established a port town in 1619 served as Dutch East Indies Company headquarters in Asia . The Javanese people were made to feel unwelcome in Batavia , as the Dutch feared Javanese revolt . To meet labor needs , Coen asked Willem Ysbrandtszoon Bontekoe , a skipper for the Dutch East India Company , to bring 1000 Chinese people to Batavia from Macao ; however , only a small segment of the 1000 survived the trip . In 1621 , another attempt was initiated and 15 , 000 people were deported from the Banda Islands to Batavia ; on this occasion , only 600 survived the trip . Batavia also imported numbers of workers and slaves from parts of the archipelago , such as Maluku Islands and Bali . After established for almost a decade , Batavia , the first Dutch settlement and trading post in Java , has drawn hostilities from surrounding kingdoms . The European port and settlement in Java ' s soil is considered as foreign threat by native polity . The Sultanate of Banten aspired to retake the port city and also to put down Banten ' s rival port . However they can not manage to launch a large scale campaign to retake the port . Banten could only launch small scale menaces on Dutch interest outside of the city wall . Learning the Europeans have better military technology , Mataram seeks diplomatic relations with the Dutch East Indies Company in 1621 . Sultan Agung , king of the Mataram Sultanate ( reign 1613 – 1645 ) sent his envoy asked Dutch assistance on his conquest against Surabaya , however the Dutch declined his request , resulted in severed diplomatic relation . First siege ( 22 August - 3 December 1628 ) . After Surabaya fell in 1625 , Sultan Agung shifted his expansive conquest of ambition westward . Cirebon was already held as an ally , although in practice was behaved as Mataram ' s vassal . In April 1628 Kyai Rangga Tapa , the regent of Tegal was sent to Batavia to propose a peace treaty with certain conditions on Mataram ' s behalf . The Dutch however , decline this proposal . On August 27 , 1628 , Sultan Agung , launched his first offensive on Batavia led by Tumenggung Bahureksa , the regent of Kendal . The Mataram naval armada led by Bahureksa brought 150 cattle , 5 , 900 sack of sugar , 26 , 600 coconuts and 12 , 000 sack of rice . They asked to land in Batavia to trade , however the numbers of Mataram armada alerted the Dutch . The next day the Dutch allowed the cattle to be delivered with conditions only one by one of Mataram ' s ship allowed to land . 100 armed guards were watching the landing in Batavia Castle . On the third day three more of Mataram ship arrived to ask for travel permit to trade with Malacca , Batavia start to suspect sudden increase of Mataram ship arrivals and start to move more artillery on Batavia Castle two northern bastions . On the afternoon 20 more Mataram ship unloaded their troops north of the castle , alarmed the Dutch retreated into the castle and started to open fire on incoming Javanese attack . On 25 August 1628 27 more of Mataram ship entered the bay but landed quite far from Batavia . On the south of Batavia , Mataram foot soldiers had arrive , around 1 , 000 troops began to apply siege upon Batavia . On 27 August the Mataram troops attacked Hollandia fort located southeast of the city . 120 armed men under the commands of Jacob van der Plaetten manage to protect the fort and Mataram suffer heavy loss . Several Dutch ships arrived from Banten and Onrust island and landed with additional 200 troops , the castle now guarded by 530 troops . The Dutch fleet destroyed both Mataram ' s supplies and ships , located in the harbours of Cirebon and Tegal . Mataram troops , starving and decimated by illness . The second troops arrived on October led by Prince Mandurareja ( grandson of Ki Juru Martani ) , with total 10 , 000 Mataram army . The Mataram troops suffered heavy losses during the battle near Batavia . Angered by the defeat , on December 1628 Sultan Agung sent executioner to punish Tumenggung Bahureksa and Prince Mandurareja . The next days , the Dutch discovered 744 corpses of headless Javanese soldiers . Second Siege ( May – September 1629 ) . Sultan Agung learned that the problem on moving large numbers of Javanese troops from Central Java to Batavia is logistic and supplies . Rather than transporting large numbers of military rice logistics , he decided to established numerous rice farming villages runs by Javanese farmers on Western Java north coast , from Cirebon to Karawang . This logistic strategy led to the Javanese migrations to Northern West Java and later prompted the establishments of Javanese rice farming villages on West Java north coast , from Cirebon , Indramayu , Karawang , and Bekasi . On May 1629 Mataram ready to launches its second campaign against Batavia . The Dutch spies however , manage to locate the Mataram ' s rice barn s and logistics in villages at Karawang and burnt them . On May 1629 the first army was led by Dipati Ukur , the regent of Priangan , the vassal of Mataram , and the second army was led by Adipati Juminah arrived on June , the total is 14 , 000 troops . Dipati Ukur was supposed to wait for Adipati Juminah reinforcement from Mataram , however because the lack of supply , Dipati Ukur decided to depart earlier and attack Batavia on May . The Javanese troops led by Adipati Juminah arrived in Karawang but felt offended on finding no Sundanese Priangan troops waiting for them , this led to distrust between Priangan and Mataram troops . The angered Mataram officials and troops creating havoc in Priangan , pillaging and raping local women . The news from his wife in Priangan angered Dipati Ukur that promptly withdrawed home and kill numbers of Mataram officials . From the example of Tumenggung Bahureksa and Prince Mandurareja execution , Dipati Ukur learn that Sultan Agung would punish failure with death . This led to the Dipati Ukur rebellion against Mataram . With lack of supplies and plagued with malaria and cholera that hit the region , the Mataram troops were arrived at Batavia exhausted . Mataram troops established encampment located south of Batavia in area now known as Matraman ( derived from " Mataraman " ) . The Mataram forces applied siege upon Batavia and disrupting Batavia ' s water supply by polluting Ciliwung River , causing cholera plague in Batavia . During this second siege Jan Pieterszoon Coen suddenly died on 21 September 1629 , highly possible because of this cholera outbreak . With internal problems among their commanders , plagued with lack of supply and illness , Mataram forces finally retreated . Aftermath . The Dipati Ukur withdrawal from the campaign and his rebellion has weakened the Mataram holds on Priangan that create instability in West Java for several years . The Dutch however manage to firmly established themselves in Java . The Batavia campaign failure has led Sultan Agung to shift his conquering ambitions to eastward direction and attacked Blitar , Panarukan and the Blambangan in Eastern Java , a vassal of the Balinese kingdom of Gelgel . Because of Sultan Agung ' s harsh discipline against failure , large numbers of Javanese troops refused to return home to Mataram . Many of them decided to marry local women and settle down in northern West Java villages . This has created the rice farming villages on Pantura ( " pantai utara " : north coast ) region of West Java , spanned from Bekasi , Karawang , Subang , Indramayu and Cirebon . The migration and settlement of Javanese people to Northern West Java has created distinctive culture , that later developed to be quite distinct to highland Sundanese and Central Javanese counterparts . In following decades , VOC successfully expands their influence by acquiring Buitenzorg and Priangan highlands , and also Mataram ' s north coast ports such as Tegal , Kendal and Semarang through concessions in expense of Mataram ' s internal problems ; plagued with succession disputes and struggle for power . Some of former Mataram encampments become name of places in Jakarta today , and can be identified with their Javanese origin names , such as Matraman , Paseban and Kampung Jawa .