The Kingdom of Mataram began to see its downfall after it was divided by the VOC into the Principalities of Yogyakarta and Surakarta . In 1814 the British came to Indonesia and built Fort York in Bengkulu on the west coast of Sumatra. It was later renamed Fort Marlborough. Sir Thomas Stanford Raffles was appointed Lieutenant Governor General of Java and dependencies. He was subordinated to the Governor General in Bengal, India.
Raffles introduces partial self-government and abolished the slave trade.
In those days slaves was captured and traded by foreigners. Borobudur and other temples were restored and research conducted. Thus, the Indonesian archipelago was recovered from the British in 1815. Soon the Dutch intensified their colonial rule. But this only sparked widespread revolts to seize freedom.