Armenian actions against their Muslim overlords began during the Russian advance into the Eastern Caucasus khanates (principalities) in 1796. These khanates, although nominally under Persian rule, were in fact ruled by local lords (khans). Their populations were mainly Turkish, with large communities of other Muslims and Armenians. When Russian armies invaded Armenian subjects of the khans acted as spies. For example, Armenians delivered the plans of the water supply of Derbend to the Russians, allowing the city to be taken.