Portugal was the first European power to establish a bridgehead on the lucrative maritime Southeast Asia trade route, with the conquest of the Sultanate of Malacca in 1511. The Netherlands and Spain followed and soon superseded Portugal as the main European powers in the region. In 1599, Spain began to colonise the Philippines. In 1619, acting through the Dutch East India Company, the Dutch took the city of Sunda Kelapa, renamed it Batavia (now Jakarta) as a base for trading and expansion into the other parts of Java and the surrounding territory. In 1641, the Dutch took Malacca from the Portuguese. Economic opportunities attracted Overseas Chinese to the region in great numbers. In 1775, the Lanfang Republic, possibly the first republic in the region, was established in West Kalimantan, Indonesia, as a tributary state of the Qing Empire; the republic lasted until 1884, when it fell under Dutch occupation as Qing influence waned.