The Dutch colonized Indonesia because of the rich resources of the country, which included spices and various agricultural products the Dutch used as cash crops. The Dutch first conducted an expedition to Indonesia in 1595 and established their first permanent trading post in 1603.
The Dutch government took direct control of Indonesia at the end of the 18th century. Following the Napoleonic Wars, the British temporarily took control of the country in 1811, but the Congress of Vienna reestablished the Dutch control over Indonesia. Indonesia gained its independence from the Dutch in 1949, after a war that lasted 4 years.