Dili was settled about 1520 by the Portuguese, who made it the capital of Portuguese Timor in 1596. During World War II, Dili was occupied by the Japanese. East Timor achieved independence from Portugal in 1975, but Indonesian forces invaded and in July, 1976, made Dili the capital of Timor Timur province.
However, a brutal guerrilla war ensued between Indonesian and pro-independence forces, during which thousands of civilians were killed. In 1999, East Timor was placed under UN supervision and on May 20 2002, Dili became the capital of the independent Democratic Republic of East Timor.