The end of the war and the Treaty of Küçük Kaynarca brought Russia's frontiers south from the Kuban River's entry into the Azov Sea along its right bank and right to the bend of the Terek River. This created a 500-verst undefended border, and in the summer of 1777 the Khopyor regiment - in addition to the remnants of the Volga Cossacks and a Vladimir Dragoon regiment - were re-settled in the Northern Caucasus to build the Azov-Mozdok defence line. This marked the start of the Caucasus War, which would continue for almost 90 years.