Since the 1200s, Malaysia is occupied by the people that migrated from Indonesia, Arabs, India, China, Europe, and other region of all around the world. At the time before 1800s, Malaysia is called Nusantara, or Malay islands (Kepulauan Melayu), with other neighbour countries which include southern Thai, Indonesia, Singapore, Philippines, Brunei, and some part of Pacific islands group.
Early 1700s, the British took the Penang island that was owned by sultan of Kedah as a first settlement in the South East Asia. Then, by they assisted by Sir Stamford Raffles to take the Singapore island from the sultanate of Johor in 1817. Then in 1824, they took Malacca after they make a deal with the Dutch. By taking other Malay states step by step, they got the Perak, Selangor, Negeri Sembilan and Pahang after these four states internal problems at the end of the year 1876. In 1905, British get another four Malay states that under Siamese control, which are Perlis, Kedah, Kelantan and Terengganu after the Bangkok Declaration. By 1917, they took the Johor as their last settlement in the Malay Peninsular and then they form the Malaya. But in Sarawak, Mr. James Brooke, the ex-British East India Company Army force gets the state from the sultanate of Brunei in 1841 after the riots occur. In Sabah, British North Borneo Company took a deal for the loan on the state from the sultanate of Brunei and also the sultanate of Sulu in the early 1880s. They also take the Sultanate of Brunei as their protected state.
However, in 1941, World War II had occurred and Japanese occupied most of the region of South East Asia except the kingdom Thailand. But the westerners got their own settlements back after Japanese surrendered. This means that British got the Malaya, Sarawak, Brunei and Sabah back. After the World War II had ended, United Nations declared all the dependent country must get independent. So the British gives the independents for the Federation of Malaya; exclude Singapore in 31st August 1957. Then, British give the independence for Singapore as a city state in June 1959. On the date of 16th September 1963, British have given the independence to Sarawak and Sabah. Then, the Federation of Malaya, Singapore, Sarawak and Sabah joined the Federal of Malaysia. Brunei refused to join by the confrontation of Indonesia, argument of the Philippines, and also the petroleum issue. The Brunei remain as British protected state until the year 1984. However, Singapore has separated from the Federal of Malaysia on 9th August 1965 due to the bad relationship between Parti Perikatan ( Allies Party ) from the Federal and Parti Tindakan Rakyat ( People’s Action Party ) from the Singapore government.
Now, there are 13 states in the Federation of Malaysia which include Perlis, Kedah, Pulau Pinang ( Penang ), Perak, Selangor, Negeri Sembilan, Melaka, Johor, Pahang, Terengganu, Kelantan, Terengganu, Sabah and Sarawak. There are also three Federal Territory which are Kuala Lumpur, Labuan and Putrajaya.