In the Mediterranean. Fossil remains of Java Man show that Java was inhabited by apelike humans about 500,000 years ago. Indonesia was later settled in successive waves of migration from the Asian mainland. Hinduism was introduced from India in the first century a.d. Later, Buddhism spread to the islands. The two religions existed together without persecution, and each adopted some of the other's rituals and philosophy.
Two great empires flourished before 1500. The Buddhist kingdom of Sri Vijaya (Srividjaja) arose on Sumatra by 600 a.d.The Hindu kingdom of Majapahit came to power on Java in the 1300's and at its height controlled many outlying islands. By 1500, however, most Indonesians were Muslims; many Hindus fled to Bali.
In 1511 Affonso de Albuquerque captured the port of Malacca, on the Malay Peninsula, for Portugal. Portugal sought to supplant the Chinese and Arabs in controlling the lucrative trade of the Moluccas, or Spice Islands. The Portuguese eventually lost the Moluccas to the Dutch, however, who organized the Dutch East India Company in 1602. The States-General (assembly) of the Dutch Republic granted the company full powers of government and a monopoly on trade. Governor General Jan Pieterszoon Coen conquered the Javanese city of Jacatra (Jakarta) in 1619. It was renamed Batavia and became Dutch headquarters in the area. Malacca was captured in 1641, ending Portuguese influence, except on the eastern half of Timor.