Malaysia is a federal constitutional monarchy in 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 similarly sized 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 was 28.33 million, with 22.6 million living on the Peninsula. The southernmost point of continental Eurasia, Tanjung Piai is in Malaysia, located in the tropics. It is one of 17 megadiverse countries on earth, with large numbers of endemic species.
The country is multi-ethnic and multi-cultural, which plays a large role in politics. The constitution declares Islam the state religion while protecting freedom of religion. The government system is closely modelled on the Westminster parliamentary system and the legal system is based on common law. The head of state is the king, known as the Yang di-Pertuan Agong. He is an elected monarch chosen from the hereditary rulers of the nine Malay states every five years. The head of government is the Prime Minister.