Between 1864 and 1885 Russia gradually took control of the entire territory of Russian Turkestan, the Tajikistan portion of which had been controlled by the Emirate of Bukhara and Khanate of Kokand.