Surabaya is the capital of the Indonesian province of East Java and the third-largest city in Indonesia. Located on the northeastern border of Java island, on the Madura Strait, it is one of the earliest port cities in Southeast Asia. According to the National Development Planning Agency, Surabaya is one of the four main central cities of Indonesia, alongside Jakarta, Medan, and Makassar. The city has a population of 2.87 million within its city limits at the 2020 Census and 9.5 million in the extended Surabaya metropolitan area, making it the third-largest metropolitan area in Indonesia.
The city was settled in the 10th century by the Kingdom of Janggala, one of the two Javanese kingdoms that was formed in 1045 when Airlangga abdicated his throne in favor of his two sons. In the late 15th and 16th centuries, Surabaya grew to be a duchy, a major political and military power as well as a port in eastern Java, probably under the Majapahit empire. At that time, Surabaya was already a major trading port, owing to its location on the River Brantas delta and the trade route between Malacca and the Spice Islands via the Java Sea.