Singapore was one of the 14 states of Malaysia from 1963 to 1965. Malaysia was formed on 16 September 1963 as a new political entity from the merger of the Federation of Malaya with former British colonies of North Borneo, Sarawak and Singapore. This marked the end of a 144-year period of British rule in Singapore, beginning with the founding of modern Singapore by Sir Stamford Raffles in 1819.
The union, however, was unstable due to distrust and ideological differences between leaders of the State of Singapore and the federal government of Malaysia. Such issues resulted in frequent disagreements relating to economics, finance and politics. The United Malays National Organisation (UMNO), which was the political party in power in the federal government, saw the participation of the Singapore-based People's Action Party (PAP) in the Malaysian general election of 1964 as a threat to its Malay-based political system. There were also major racial riots that year involving the majority Chinese community and the Malay community in Singapore. During a 1965 Singaporean by-election, UMNO threw its support behind the opposition Barisan Sosialis candidate. In 1965, Malaysian Prime Minister Tunku Abdul Rahman decided upon the expulsion of Singapore from the Federation, leading to the independence of Singapore on 9 August 1965.