Before the British, Singapore — Temasek in old Javanese records and Singapura, the "Lion City", in Malay legend — was a trading port in the 14th century and later part of the Johor Sultanate, home to Malay and Orang Laut communities.
In 1819 Sir Stamford Raffles of the British East India Company landed on the north bank of the Singapore River and, through a treaty with Sultan Hussein Shah of Johor and the Temenggong, set up a free trading post. Under the Raffles Town Plan of 1822 the town was divided into quarters for its communities — the origin of Chinatown, Kampong Glam and, later, Little India. In 1826 Singapore joined Penang and Malacca in the Straits Settlements, which became a British crown colony in 1867. Immigrants from China, India, the Malay world and beyond built a busy port.
On 15 February 1942 the British surrendered to Japan, and during the Japanese occupation (1942–1945) the island was renamed Syonan-to; many civilians died. After the war Singapore became a separate crown colony, gained self-government in 1959, and joined Malaysia in 1963. On 9 August 1965 it separated and became an independent republic under Prime Minister Lee Kuan Yew.
Since then Singapore has grown into a global port, airport and financial centre. Land reclaimed from the sea created Marina Bay, now its skyline, and public housing (HDB flats) is home to most Singaporeans.