China–East Timor relations
China-East Timor relations were established following East Timor's independence on May 20, 2002. However, China had established a representative office in Dili in 2000, when was still under United Nations administration. Since East Timor's independence, China has paid for the construction of the Presidential Palace in Dili, as well as the Ministry of Foreign Affairs and the residential headquarters of the Defence Force. In 2003, Beijing signed a deal with the Community of Portuguese Language Countries, of which East Timor is a member, to increase trade and economic development among the countries. In  2006, the then President Xanana Gusmão called China "a “reliable friend” and had committed East Timor to a One China policy" In 2014, the two countries issued a joint communiqué reaffirming that East Timor recognised the Government of the People's Republic of China as "the sole lawful Government representing the whole of China", that Taiwan was "an inalienable part of the Chinese territory", and that East Timor would not establish "any form of official relationship or conduct any form of official contacts" with Taiwan. When East Timor was under Portuguese rule, Taiwan, as the "Republic of China", had a  Consulate in Dili. However, when Fretilin unilaterally declared the territory's independence as the Democratic Republic of East Timor, on 28 November 1975, the People's Republic of China was one of the few countries in the world to recognise the new state. Following the Indonesian invasion on 7 December 1975, China, as a permanent member of the UN Security Council, supported United Nations Security Council Resolution 384 deploring the invasion, upholding the territory's right to self-determination and calling on Indonesia to withdraw. There is also increased military cooperation between the two countries, with the 2008 purchase of  two Shanghai-Class patrol boats from a Chinese company. These boats were initially to be manned by Chinese sailors, while the Chinese trained the Timorese to guard their coasts. In addition, China signed a contract providing US$9 million toward the building of a new headquarters for the military in East Timor.