Нерчинский договор
Albazin was eventually ceded to the Qing in the 1689 Treaty of Nerchinsk, in exchange for trading privileges in Beijing and the right to keep the city of Nerchinsk.