Нерчинский договор
For many centuries, the Nivkh were tributary to the Manchus. After the Treaty of Nerchinsk in 1689, they functioned as intermediaries between the Russians, Manchu and Japanese, also with the Ainu who were vassals of the Japanese. Early contact with the southern Sakhalin Ainu was generally hostile, although trade between the two was apparent.