By 1740 ethnic unrest in the Chinese quarters had grown to dangerous levels and on 9 October violence broke out on Batavia’s streets; around 5000 Chinese were massacred. A year later Chinese inhabitants were moved to Glodok, outside the city walls. Other Batavians, discouraged by the severe epidemics between 1735 and 1780, also moved, and the city began to spread far south of the port.
Dutch colonial rule came to an end with the Japanese occupation in 1942 and the name ‘Jakarta’ was restored, but it wasn’t until 1950 that Jakarta officially became the capital of the new republic.