The founding of modern Singapore in 1819 by Sir Stamford Raffles paved the way for Singapore to become a modern port and established its status as a gateway between the Western and Eastern markets.
This was distinct from its earlier probable use as a port in ancient times during the dominance of Srivijaya, and later, Melaka in the region. This was because previously, the main markets were India and China. However, with the founding of modern Singapore, Europe, and to an extent, the United States, had now become sources of trade as well.
In 1818, Raffles managed to convince Lord Hastings, the then governor-general of India and his superior at the British East India Company, to fund an expedition to establish a new British base in the region. Raffles then undertook weeks of lengthy searching and found several islands that seemed promising but were later revealed unfit for use either because they were already occupied by the Dutch, or could not function as a port for reasons such as having too shallow a harbour. Eventually, after contemplating several maps, Raffles happened upon the island of Singapore, which upon investigation, seemed to be a natural choice. It lay at the southern tip of the Malay peninsula, near the Straits of Malacca, and possessed an excellent natural harbour, fresh water supplies, and timber for repairing ships. Most importantly, it was unoccupied by the Dutch.
Raffles' expedition arrived in Singapore on 28 January 1819. He found a small Malay settlement at the mouth of the Singapore River, headed by a Temenggong (governor) of Johor. The island was nominally ruled by Johor, but the political situation there was extremely murky. The current Sultan of Johor, Tengku Abdul Rahman, was controlled by the Dutch and the Bugis, and would never agree to a British base in Singapore. However, Abdul Rahman was Sultan only because his older brother, Tengku Hussein, also known as Tengku Long, had been away in Pahang getting married when their father died.
With the Temenggong's help, Raffles smuggled Tengku Hussein, then living in exile on one of the Riau Islands, to Singapore. He offered to recognize Hussein as the rightful Sultan of Johor, and provide him with a yearly payment; in return, Hussein would grant the British East India Company the right to establish a trading post on Singapore. This agreement was ratified with a formal treaty signed on 6 February 1819, and modern Singapore was born