The history of the Republic of Singapore began when Singapore separated from the Malaysian federation on 9 August 1965 and became an independent republic. After the separation, the fledgling nation had to become self-sufficient, but was faced with problems including mass unemployment, housing shortages, and a lack of land and natural resources, such as petroleum. During Lee Kuan Yew's term as prime minister from 1959 to 1990, his government curbed unemployment, raised the standard of living and implemented a large-scale public housing programme. The country's economic infrastructure was developed, racial tension was eliminated and an independent national defence system was established. Singapore evolved from a third world nation to first world nation towards the end of the 20th century.

In 1990, Goh Chok Tong succeeded Lee as prime minister. During his tenure, the country tackled the economic impacts of the 1997 Asian financial crisis and the 2003 SARS outbreak, as well as terrorist threats posed by the Jemaah Islamiah (JI) post-9/11 and the Bali bombings. In 2004, Lee Hsien Loong, the eldest son of Lee Kuan Yew, became the third prime minister. In 2024, Lee was succeeded by Lawrence Wong as prime minister.

Independence from Malaysia

Singapore became part of Malaysia on 16 September 1963 following a merger with Malaya, North Borneo, and Sarawak. The merger was thought to benefit the economy by creating a common, free market, and to improve Singapore's internal security. However, it was an uneasy union. Disputes between the state government of Singapore and the federal government occurred on different issues, especially the federal policies of affirmative action, which granted special privileges to the Malays guaranteed under Article 153 of the Constitution of Malaysia. Singapore Prime Minister Lee Kuan Yew, and other political leaders began advocating for equal treatment of all races in Malaysia, with a rallying cry of "Malaysian Malaysia!"

Racial tensions between the Chinese and Malays increased dramatically, resulting in numerous racial riots. The most notorious riots were the 1964 race riots that first took place on the Mawlid on 21 July with 23 people killed and hundreds injured. The price of food increased greatly when the transport system was disrupted during the unrest, causing further hardship for the people.

The state and federal governments also had conflicts on the economic front. UMNO leaders feared that the economic dominance of Singapore would inevitably shift political power away from Kuala Lumpur. Despite an earlier agreement to establish a common market, Singapore continued to face restrictions when trading with the rest of Malaysia. In retaliation, Singapore refused to provide Sabah and Sarawak the full extent of the loans previously agreed to for economic development of the two eastern states. The situation escalated to such intensity that talks soon broke down and abusive speeches and writings became rife on both sides. UMNO extremists called for the arrest of Lee Kuan Yew.

On 15 July 1965, Goh Keng Swee met with Tun Razak in Kuala Lumpur and suggested separation to resolve the strained relationship between Singapore and Malaysia. Although Lee had contemplated alternatives such as a looser federation or a confederation, Goh never raised either option with Tun Razak, recognising the Malaysian leadership's reluctance to retain Singapore within the Federation. Lee only learned of this in 1994, when he read Goh's oral history account of the separation. Subsequently, on 26 July 1965, Lee authorised Goh in a letter to resume discussions for "any constitutional rearrangements of Malaysia". Both sides coordinated discreetly to ensure that when the Tunku publicly announced Singapore's separation, the process would be presented as a fait accompli that could not be obstructed by popular resistance or pro-merger sentiment, which had remained significant at the time.

Lee instructed Singapore's law minister E. W. Barker to begin drafting the legal documents for Singapore's separation from Malaysia. He also enlisted the assistance of his wife, Kwa Geok Choo, to help review the documents and ensure the inclusion of the water agreements signed between Singapore and Johor. Upon reviewing and approving the drafts, Lee authorised Barker to transmit them to Razak. Throughout this period, Tun Razak kept the Tunku apprised of the developments. The Tunku subsequently endorsed the drafts and gave his assent to the separation. At the conclusion of the negotiations, Goh, Lee, Barker, Razak, Ismail and the Tunku all concurred that it would be in the best interests of both parties for Singapore and Malaysia to part on a "clean break" and pursue separate paths.

The discussions between Malaysian and Singaporean leaders, along with the drafting of the separation documents, were carried out under strict secrecy, with Toh Chin Chye and Rajaratnam initially kept uninformed. When Lee summoned them to Kuala Lumpur on 7 August and presented the documents, just two days before the planned separation, both Toh and Rajaratnam were deeply distressed and initially refused to endorse the agreement. It was only after receiving a personal letter from Tunku, emphasising that Singapore's expulsion was final, that the two men signed. Lee also told Toh and Rajaratnam that he would not proceed with separation if both refused to sign, but they would have to assume responsibility if racial clashes continued.

On 9 August 1965 at 9:30am, Tunku convened the Malaysian parliament and moved the Constitution and Malaysia (Singapore Amendment) Bill 1965, which passed unanimously by a vote of 126–0 without PAP representatives present. The Bill was later approved by the Dewan Negara unanimously under a certificate of urgency. Singapore's independence was announced locally via radio at the same time and Lee broke the news to senior diplomats and civil servants. Initial reactions among Singaporeans to the announcement were mixed; a few were despondent while others let off firecrackers in celebration.

1965 to late 1970s

After gaining independence abruptly, Singapore sensed the need for immediate international recognition of its sovereignty. In this period, there were regional conflicts as well as international tensions. The Konfrontasi was ongoing and some UMNO factions strongly opposed the separation; Singapore faced the danger of being attacked by Indonesian military or forcibly reabsorbed into Malaysia on disadvantageous terms. With the help of the Malaysian, Republic of China, and Indian governments, Singapore became a member of the United Nations on 21 September 1965, and the Commonwealth in October that year.

A new foreign ministry was established and was headed by Sinnathamby Rajaratnam who helped to assert Singapore's independence and established diplomatic relations with other countries. The participation in international organisations also helped to boost trade through cooperation. Singapore later co-founded the ASEAN on 8 August 1967, joined the Non-Aligned Movement in 1970, and later the World Trade Organization.

In 1971, the Five Power Defence Arrangements (FPDA) between Singapore, Australia, Malaysia, New Zealand and Britain was established. As a tiny island, Singapore was seen as a nonviable nation state; much of the international media was sceptical of prospects for Singapore's survival. Besides the issue of sovereignty, the pressing problems were unemployment, housing, education, lack of natural resources and lack of land.

Singapore also faced the threat of terrorism. By the 1970s, the Malayan Communist Party had split into smaller groups. While no longer a formidable, unified force, the communists still posed a danger to the internal security of Singapore. Police raids against these groups uncovered large quantities of weapons such as pistols and grenades. During this decade, the communists carried out acts of violence that included the killing of a 7-year-old girl in Changi in 1970. There was also an explosion of a bomb in Katong in 1974, as well as the attempted assassination of Singapore's Commissioner of Police in 1976.

Independent Singapore experienced its first encounter with international terrorism on 31 January 1974 when foreign terrorists hijacked the ferry boat Laju and held crew members hostage. The terrorists had earlier attacked the oil refinery on Pulau Bukom in an attempt to disrupt the oil supply from Singapore to South Vietnam. After days of negotiation, the hijackers finally agreed to release the hostages in exchange for safe passage from Singapore to Kuwait. To ensure safe passage of hijackers of the Laju from Singapore to Kuwait, a group of Singapore government officials, led by S.R. Nathan, accompanied by the hijackers on their flight. Nathan was then Director of the Security and Intelligence Division at the Ministry of Defense, and would later go on to serve as the President of Singapore. The Singapore team comprised Nathan, eight government officials and four Singapore Armed Forces commandos. On 9 February 1974, the 13 Singaporean officials returned to Singapore from Kuwait.

The unemployment rate ranged between 10 and 12% and it threatened to create civil unrest. The loss of access to the Malaysian hinterland market and the lack of natural resources meant that Singapore had no solid traditional sources of income. A large portion of the population lacked formal education, even taking into account Chinese schools, which the British did not recognise. Entrepot trade, the main use of Singapore's port and the original reason for Singapore's success in the 19th century, was no longer sufficient to support the large population.

Economic focus Singapore invested heavily to promote economic growth. The Economic Development Board was set up in 1961 by Goh Keng Swee, and with the assistance of Dutch economic advisor Albert Winsemius, national economic strategies were formulated to promote Singapore's manufacturing sector. Industrial estates were set up, especially in the reclaimed swampland of Jurong, and government ministers toured the world in order to try to attract foreign investment. The government offered new investors tax holidays of 5–10 years.

Singapore's port gave her an advantage over her neighbouring countries, being a favourable spot for efficient exports of refined goods and imports of raw materials. This meant that industries in Singapore found international markets easily, and cheaper prices for raw goods. Singapore's growing industrialisation meant that entrepot trade had been extended into processing of imported raw materials into exported finished products—leading to higher value-added goods which brought more income to the island. This ended up being a suitable alternative to a common market to the Malaysian hinterland, although later a form of it ended up being formed with the creation of ASEAN.

The service industry also grew at this time, sparked by demand for services by ships calling at the port and increasing commerce. This progress helped to alleviate the unemployment problem. With Winsemius's help, Singapore attracted big oil companies like Shell and Esso to establish oil refineries in Singapore which became the third largest oil-refining centre in the world by the mid-1970s.

The new direction that Singapore took demanded a skilled labour force to engage in her revised role of refining raw goods, as opposed to the traditional natural resource extraction industries of her neighbours. Its leaders decided early on that the population would need to be fluent in the English language, as they would be communicating and cooperating with expatriate employers or business partners abroad, and English was adopted as the medium of education for all schools.