With his long Malayan experience and an intimate knowledge of Riau-Lingga politics, Major Farquhar was given the task to help Sir Stamford Raffles find a settlement on Singapore island. He helped negotiate the provisional agreement of 30 January 1819 with the local chieftain Temenggong Abdul Rahman; and the more formal Singapore Treaty of 6 February 1819, which Raffles signed with the Temenggong and His Highness the Sultan Hussein Mohammed Shah, confirming the right for the British to set up a trading post. On the same day, Farquhar, accompanied by a few Malaccan Malays, had to climb up the hill, known as the Bukit Larangan.