Endirey
Endirey lay in the Kumyk country where the foothills of Dagestan meet the northern plains. During the Safavid era it was the seat of a small principality whose rulers dealt with neighboring mountain communities and the great powers approaching from north and south. Its position made it an early obstacle to Russian expeditions along the western Caspian coastal route.
In 1722 Peter the Great sent forces towards Endirey during his Persian campaign. A Russian cavalry detachment was ambushed in a gorge near the settlement by Chechen and Kumyk fighters; another detachment entered and destroyed Endirey. The fighting revealed the difficulty of asserting control over the foothills, where local rulers and their allies could challenge an army advancing towards the Caspian coast.