Singapore was an important trading centre in the 12th and 13th centuries. It is said to have been attacked and devastated by the Javanese in 1252. At the time when it passed by treaty to the East India Company in 1819, Sir Stamford Raffles persuading the sultan and Tumenggong of Johor to cede it to him, it was wholly uninhabited except by a few fisherfolk living along its shores. It was at first subordinate to Benkulen, the company's principal station in Sumatra, but in 1823 it was placed under the administration of Bengal. It was incorporated in the colony of the Straits Settlements when that colony was established in 1826.
In 1942, the colony famously fell to the Imperial Japanese Army who had sped through Malaya quicker than any British commanders had anticipated.
It joined Malaysia in 1963, leaving it to become an independent state in 1965.