Malaysia is a country in Southeast Asia. A federal constitutional monarchy, it consists of 13 states and three federal territories, separated by the South China Sea into two regions: Peninsular Malaysia on the Indochinese Peninsula and East Malaysia on the island of Borneo. Peninsular Malaysia shares land and maritime borders with Thailand, as well as maritime borders with Singapore, Vietnam, and Indonesia; East Malaysia shares land borders with Brunei and Indonesia, and maritime borders with the Philippines and Vietnam. Kuala Lumpur is the country's national capital, largest city, and the seat of the legislative branch of the federal government, while Putrajaya is the federal administrative capital, representing the seat of both the executive branch (the Cabinet, federal ministries, and federal agencies) and the judicial branch of the federal government. With a population of over 34 million, it is the world's 42nd-most populous country.
The country has its origins in the Malay kingdoms, which, from the 18th century on, became subject to the British Empire, along with the British Straits Settlements protectorate. During World War II, British Malaya, along with other nearby British and American colonies, was occupied by the Empire of Japan. Following three years of occupation, Peninsular Malaysia was briefly unified as the Malayan Union in 1946 until 1948 when it was restructured as the Federation of Malaya. The country achieved independence on 31 August 1957. On 16 September 1963, independent Malaya united with the then British crown colonies of North Borneo, Sarawak, and Singapore to become Malaysia. In August 1965, Singapore was expelled from the federation and became a separate, independent country.