Though education amongst Indonesians was still the preserve of a rich minority, it was from this minority that the leaders of the
Independence movement would emerge. The Partai Nasional Indonesia (PNI), founded in 1927 by Achmed Sukarno, grew to become the biggest of the independence organizations. It aimed to achieve independence through non-co-operation and mass action, and quickly became a major threat to Dutch domination, so much so that the Dutch outlawed the party four years after its foundation, throwing its leaders, Sukarno included, in prison, and later exiling them. But when Hitler invaded Holland on May 10, 1940, the Dutch government fled to London, and the issue of Indonesia's independence was put on ice.
The Japanese made no secret of their intention to "liberate" Indonesia and when they did finally invade, in January 1942, most Indonesians saw them as liberators, rather than just another occupying force. On March 8, 1942, the Dutch on Java surrendered, and a three-and-a-half-year Japanese occupation began. Though every bit as ruthless as the Dutch, the Japanese did at least encourage the nationalist movement, and by 1945 were negotiating with Sukarno and others. Sukarno came up with his constitutional doctrine of Pancasila , the "five principles" by which an Independent Indonesia would be governed: belief in God, nationalism, democracy, social justice and humanitarianism.
On August 17, 1945, two days after the Japanese surrender to the Allied forces, Sukarno read a simple, unemotional Declaration of Independence to a small group of people outside his house in Menteng. The Republic of Indonesia was born, with Achmed Sukarno as its first president.