The history of the Republic of Singapore began when Singapore gained its independence and became a republic following a secession from the Federation of Malaysia on 9 August 1965. After the separation, the fledgling nation had to become self-sufficient, and faced problems including mass unemployment, housing shortages and lack of land and natural resources such as petroleum. During Lee Kuan Yew's term as prime minister from 1959 to 1990, his administration 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 created. Singapore evolved from a developing nation to first world status 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-September 11 and the Bali bombings. In 2004 Lee Hsien Loong, the eldest son of Lee Kuan Yew, became the third prime minister.