While succession disputes embroiled the Malay states, British intervention consolidated their power by appointing residents to advise Sultans. In Perak, succession disputes among Chinese secret societies overlapped with fights over rich tin deposits. The Pangkor Treaty of 1874 made Perak a protectorate and appointed JWW Birch as the first British resident. This set a precedent for the other Federated Malay States to become protectorates governed through a residential system.