Xanana Gusmao's political career began in 1974 and, one year later the Indonesian invasion of the capital, Dili resulted in the death of the then President. Leading the struggle from the rugged mountains of Timor-Leste, it was not until 1992 that he was captured by Indonesian forces and imprisoned. From his cell he devoted his time to developing strategies for the Resistance and while still in prison he was appointed President of the East Timorese Resistance. Xanana Gusmao was elected first President of the Democratic Republic of Timor-Leste on 20 May 2002. Then on 8 August 2007, he was elected Prime Minister and Minister for Defence and Security.