In the 1st and 2nd centuries AD, the islands that make up Indonesia came under the influence of Hindu priests. In the 13th century AD, Muslim invasions began in earnest and within about 200 years, most of the archipelago had converted to Islam. Over the next few centuries both Portuguese and Dutch traders discovered the rich natural resources of Indonesia and struggled to set up trading posts. Perhaps the most successful was the Dutch United East India Company which established posts on the island of Java, in an effort to control the spice trade.
Meanwhile, on the other side of the world, the French emperor Napoléon conquered the Netherlands in 1811, and that left the door open for the British who seized the Indonesian islands; however, a few years later, they gave control of Indonesia back to the Dutch. In 1922, Indonesia was made an important part of the Dutch empire.
During World War II, Japan seized the islands. Tokyo was really interested in Indonesia's massive reserves of oil, which was vital to their war effort. After the Japanese surrendered and the war ended, there was a nationalist independence movement and on August 17, 1945, leaders of Indonesia officially declared independence. A bitter four year battle for independence followed and finally, in 1949 the Dutch and Indonesia leaders signed an agreement to form a union; this lasted until 1956 when Indonesia voided the union and began seizing Dutch property on the islands.
In the years since Indonesia became an officially independent country, there has been a lot of conflict over leadership and styles of government – from shaky alliances with foreign powers to communist dictatorships to military interventions, the people of Indonesia have endured a lot of governmental conflict. Even today, there is unrest in certain parts of the country, such as in Aceh. Today, Indonesia is officially governed as a republic.