The first known inhabitants of Malaysia were the Orang Asli. They are thought to have arrived in Malaysia around 3000 B.C. Their descendants still live in Malaysia today. The Malays were among the second and third wave of settlers in Malaysia and arrived around 1000 B.C. The Malays were sailors and traders, which brought them into contact with other peoples, including the Indians and the Chinese.

By the 15th century, the Malays had established independent city-states within the Melaka Empire. The city-states were ruled by sultans. In 1511, the Portuguese arrived in Melaka and set up trading posts. The Dutch captured Melaka in 1641. As the power of the Dutch declined towards the end of the 18th century, the British took over the Dutch settlements. The sultans kept their power while the British operated businesses, mines and plantations and built roads and railways. The British brought in labourers from China and India to work for them.

The Japanese invaded and occupied the Malay States from 1941 to 1945. In 1948 the nine states of the peninsula, along with Melaka and Pulau Pinang, formed a Malayan Federation, with its seat of government in Kuala Lumpur.

In 1948 Malayan communists started a guerilla war against the government, which was known as "The Emergency," but they failed to establish communism. Malaya became independent from Great Britain in 1957. Under its constitution, the monarch was elected from one of the sultans every five years. A political alliance was also formed between parties representing the Malays, the Chinese, and the Indians. In 1963, Sarawak, Sabah and Singapore joined the federation. Singapore left the union in 1965.

 Did you know?
In 1842, a British adventurer called James Brooke helped the Sultan of Brunei suppress a rebellion on the island of Borneo. The sultan rewarded Brooke by naming him the Rajah of Sarawak. James's successor as Rajah, Charles, had a son by a local woman. The son came to Canada in the 1880s and lived in Ontario until his death in 1953.

In its first few years of nationhood, Malaysia repelled attacks from Indonesia, which opposed the formation of the new state. This fighting ended in 1966. Relations between the Chinese and the Malays were often difficult. Malay is the official language and Malays held political power, but the Chinese had greater economic power.

In the early 1970s, the government introduced the New Economic Policy (NEP), designed to eradicate poverty and restructure society. The NEP benefited many Malays. The policy was replaced in 1991 with the New Development Policy, which has set new targets for economic development.