Two treaties between the Sikkim Raja and the British, in 1817 and in 1861, gave the British a degree of control over Sikkim, and more importantly, by the terms of the latter treaty, they also secured the right to trade with Tibet through Sikkim territory.