Malaysia is a federal constitutional monarchy in Southeast Asia. It consists of thirteen states and three federal territories and has a total landmass of 329,847 square kilometres (127,350 sq mi) separated by the South China Sea into two regions, Peninsular Malaysia and Malaysian Borneo. Land borders are shared with Thailand, Indonesia, and Brunei, and maritime borders exist with Singapore, Vietnam, and the Philippines. The capital city is Kuala Lumpur, while Putrajaya is the seat of the federal government. In 2010 the population exceeded 27.5 million. Malaysia has its origins in the Malay Kingdoms present in the area which, from the 18th century, became subject to the British Empire. The first British territories were known as the Straits Settlements, with the other states forming protectorates. The states on Peninsular Malaysia, then known as Malaya, was first unified as the Malayan Union in 1946. Malaya was restructured as the Federation of Malaya in 1948, and achieved independence on 31 August 1957. Malaya united with Sabah, Sarawak, and Singapore on 16 September 1963, with 'si' being added to give the new country the name Malaysia. However, less than two years later in 1965, Singapore was expelled from the federation. Since independence, Malaysia has had one of the best economic records in Asia, with GDP growing an average 6.5% for almost 50 years. The economy has traditionally been fuelled by its natural resources, but is expanding in the sectors of science, tourism, commerce and medical tourism. The head of state is the Yang di-Pertuan Agong, an elected monarch chosen from the hereditary rulers of the nine Malay states every five years. The head of government is the Prime Minister. The government system is closely modelled on the Westminster parliamentary system and the legal system is based on English Common Law. The country is multi-ethnic and multi-cultural, factors that influence its culture and play a large role in politics. Islam is the state religion, although freedom of religion is protected by a secular constitution. Malaysia contains the southernmost point of continental Eurasia, Tanjung Piai, and is located near the equator and has a tropical climate. It has a biodiverse range of flora and fauna, and is considered a megadiverse country. It is a founding member of the Association of Southeast Asian Nations and the Organisation of Islamic Cooperation, and a member of Asia-Pacific Economic Cooperation, the Commonwealth of Nations, and the Non-Aligned Movement.