The occupation of Indonesia by Japan for three and a half years during World War II was a crucial factor in the subsequent revolution. The Netherlands had little ability to defend its colony against the Japanese army, and within only three months of their initial attacks, the Japanese had occupied the Dutch East Indies. In Java, and to a lesser extent in Sumatra (Indonesia's two dominant islands), the Japanese spread and encouraged nationalist sentiment. Although this was done more for Japanese political advantage than from altruistic support of Indonesian independence, this support created new Indonesian institutions (including local neighbourhood organisations) and elevated political leaders such as Sukarno. Just as significantly for the subsequent revolution, the Japanese destroyed and replaced much of the Dutch-created economic, administrative, and political infrastructure.