for him. In the late 16th century several campaigns by the Terek Cossacks were carried out against the Ottoman Empire (Temryuk) which led the Sultan to complain to Ivan the Terrible. In 1589 the first outpost on the Sunzha was built and a permanent Terka, later known as Tersky Gorodok, was built on the lower Terek. 17th century During the Time of Troubles in 1606 four thousand Terek Cossacks left for the Volga to support their own candidate for the Tsar, Ileyka Muromets. By 1614 the Rowers supported the new Romanov monarch and aided him in quelling the unrest in Astrakhan. In 1633 they destroyed the remnants of the Nogay Horde and a decade later aided the Don Cossacks against the Crimean Khanate in 1646. By the mid 17th century the Cossacks again expanded into the Sunzha where they built a new outpost in 1651. Two years later the outpost withstood a hailing attack by Kumyks and Dagestanis. Though the battle ensured the Tsar's respect, it was advised that the Cossacks pull down the outpost. In the 1670s the Terek Cossacks helped to defeat Stenka Razin in Astrakhan. In 1680 after the Raskol in the Russian Orthodox Church reached the Don Cossacks, a number of Old Believers left the Don River and settled first on the Kuma and later on the Agrakhan. After the aid of the Terek and Rowing Cossacks to the Don Cossacks during the Azov Campaigns in 1695, the Ottoman Empire retaliated against the Terek Cossacks and in 1707 most of their outposts were destroyed on the right bank of the Terek. 18th century In 1711 Graf Apraskin re-settled all of the Rowing Cossacks on the left bank of the Terek River, this move was met with resentment, and during the entire 18th century the Terek Cossacks would still inhabit the left bank and use the rich vineyards and lands right up until 1799. Also in 1720 the Rowers and Tereks were fully incorporated into the Russian Empire and during the Russo-Persian War (1722–1723), the Cossacks aided Peter I of Russia in his conquest of the eastern Dagestan and the capture of Derbent. During the campaign the 1000 re-settled Don Cossacks on the Agrakhan and the Sulak formed the Agrakhan Cossack Host (Аграханское Казачье Войско), which was united with the Terek Cossacks. In 1735 by a new agreement with Persia the Sulak line was abandoned, and Agrakhan