When Sir Stamford Raffles first arrived in Singapore in 1819, he signed a treaty with Tengku Abdul Rahman (the local Sultan) and Tengku Hussein (the Temmengong which became Sultan since he was the elder brother). The Sultan and Temmengong were paid money for allowing the British to set up a port in Singapore.