Jarkata grew throughout the 20th century (and the early 21st) first as the colonial capital (as Batavia) and then as the national capital. Bandung grew rapidly in the second half of the 20th century, partly because it had been a resort city for colonials (since it is more temporate than cities at lower elevations), and partly because it became a provincial capital. In the 20th century Surabaya retained its importance as a commercial port and grew in size. In the later 20th century Medan grew as an agricultural center and provincial capital, with inter-island migrations adding to its size.