The Japanese invasion and subsequent occupation during World War II ended Dutch rule and encouraged the previously suppressed independence movement. Two days after the surrender of Japan in August 1945, Sukarno and Mohammad Hatta, influential nationalist leaders, proclaimed Indonesian independence and were appointed president and vice-president, respectively.