Pre-colonial era
The area in and around modern Jakarta was part of the fourth century Sundanese kingdom of Tarumanagara, one of the oldest Hindu kingdoms in Indonesia. Following the decline of Tarumanagara, its territories, including the Jakarta area, became part of the Kingdom of Sunda. From 7th to early 13th century port of Sunda is within the sphere of influence of Srivijaya maritime empire. According to the Chinese source, Chu-fan-chi, written circa 1200, Chou Ju-kua reported in the early 13th century Srivijaya still ruled Sumatra, the Malay peninsula, and western Java (Sunda). The source reports the port of Sunda as strategic and thriving, pepper from Sunda being among the best in quality. The people worked in agriculture and their houses were built on wooden piles. The harbour area became known as Sunda Kelapa and by the fourteenth century, it was a major trading port for Sunda kingdom.
The first European fleet, four Portuguese ships from Malacca, arrived in 1513 when the Portuguese were looking for a route for spices. The Kingdom of Sunda made an alliance treaty with Portugal by allowing the Portuguese to build a port in 1522 in order to defend against the rising power of the Sultanate of Demak from central Java. In 1527, Fatahillah, a Javanese general from Demak attacked and conquered Sunda Kelapa, driving out the Portuguese. Sunda Kelapa was renamed Jayakarta, and became a fiefdom of the Sultanate of Banten which became a major Southeast Asia trading centre.
Through the relationship with Prince Jayawikarta from the Sultanate of Banten, Dutch ships arrived in Jayakarta in 1596. In 1602, the English East India Company 's first voyage, commanded by Sir James Lancaster, arrived in Aceh and sailed on to Banten where they were allowed to build a trading post. This site became the centre of English trade in Indonesia until 1682.
Jayawikarta is thought to have made trading connections with the English merchants, rivals of the