In Circassia, the Russians faced disorganized but continuous resistance. While Russia believed it held authority over Circassia based on the Ottomans ceding it in the 1829 Treaty of Adrianople, the Circassians considered this invalid, arguing that because their territory had been independent of the Ottomans, Istanbul had no right to cede it. Relations before the 19th century between the Circassians and the Cossacks had often been cordial with extensive trade, and mutual raids against the Turks and Crimeans. However, after a large influx of Cossack settlers and the construction of a long line of pickets in 1792 which cut the Circassians off from their traditional pastures around the Kuban river the Circassians and other Caucasian peoples began systematically raiding Russian encampments and then disappearing. At the same time, as more Russian troops came to be stationed in the region, their own perceived needs (owing to the difficulty of shipping materials back from Russia proper) tempted them in turn to raid native villages, further enraging the natives and producing cycles of retaliation. The Circassians fought the Russians longer than all the other peoples of the Caucasus from 1763–1864.