During the Second World War the Dutch lost control and in August 1945, Sukarno, an influential nationalist leader, declared independence and was appointed president. After some fights the Netherlands formally recognised Indonesian independence in December 1949 (with the exception of The Dutch territory of West New Guinea).