In 1838, the Amirs signed a treaty allowing British intervention and resident presence.