The tribal history of Malaysia dates back 40,000 years, but Hindu and Buddhist kingdoms spread out across the peninsula from the third century BC onwards. Islam arrived with Indian and Arab traders in the 13th century and Malacca was established as the seat of the first Malay sultanate. Over the following centuries, Islamic dynasties spread their faith across the peninsula and surrounding islands.
The Dutch and Portuguese were the first colonial powers to establish trading posts in Malaysia, but the British took an increasingly dominant role from the 18th century onwards. In 1857, the port cities of Georgetown (Penang) and Malacca were joined by a new city in the jungle-cloaked interior. Founded by Chinese tin miners, Kuala Lumpur grew to become first a provincial capital, and later the capital of the nation.
Established in 1895, the Federated Malay States remained under British colonial control until the Japanese invasion in WWII, after which time the 11 states were reinvented as a British protectorate and rebranded as the Federation of Malaya. From 1948 to 1960, the country faced a violent Communist uprising, known as the Emergency, which drove a wedge between the Malay and Chinese populations.
After a series of complicated negotiations, the Federation merged with Singapore and the former British colonies of Sarawak and Sabah, to form modern Malaysia, which came into existence on 16 September 1963. With power concentrated amongst Muslim Malays, Chinese-dominated Singapore seceded to become an independent state in 1965, leaving Malaysia in its present form.
Since Independence, Malaysia has grown into one of the powerhouse economies of south-east Asia, despite a number of national crises, most significantly the Asian financial crisis of 1997. The political situation is still volatile, with internal power struggles between the main political parties, and unresolved tensions between Malay, Indian and Chinese citizens. The election of Abdullah Ahmad Badawi in 2004 promised a new era of political reform, but power remains concentrated within the Malay community.