the Turkmen area remained independent. Russians decided to move into Transcaspian region, allegedly to subdue Turkmen slave trade and banditry. The service of some Turkmen tribes, especially the Yomut, for the Khivan Khan also encouraged the Russia to punish them by raids into Khwarazm, which killed hundreds. These wars culminated in the Battle of Geok Tepe in 1881, where General Skobelev massacred 7,000 Turkmens at the desert fortress of Geok Depe, near modern Ashgabat; another 8,000 were killed trying to flee across the desert. In September of that year, Qajar Iran signed the treaty of Akhal with Imperial Russia which officially recognized the territory that today incorporates modern Turkmenistan as part of the Russian Empire. By 1894, Imperial Russia had taken control of almost all of Turkmenistan except around part of Konye-Urgench was in Khiva and around part of Charju was in Emirate of Bukhara. The Transcaspian Railway was started from the shores of the Caspian in 1879 in order to secure Russian control over the region and provide a rapid military route to the Afghan border. In 1885 a crisis was precipitated by the Russian annexation of the Pandjeh oasis, to the south of Merv, on a territory of modern Afghanistan, which nearly led to war with Britain. as it was thought that the Russians were planning to march on to Herat in Afghanistan. Until 1898 Transcaspia was part of the Governor-Generalship of the Caucasus and administered from Tiflis, but in that year it was made an Oblast of Russian Turkestan and governed from Tashkent. Nevertheless, Turkestan remained an isolated colonial outpost, with an administration that preserved many distinctive features from the previous Islamic regimes, including Qadis' courts and a 'native' administration that devolved much power to local 'Aksakals' (Elders). In 1897 the Transcaspian Railway reached Tashkent, and finally in 1906 a direct rail link with European Russia was opened across the steppe from Orenburg to Tashkent. This led to much larger numbers of Slavic settlers flowing into Turkestan than had hitherto been the case, and their settlement was overseen by a specially created Migration Department in St. Petersburg (Переселенческое Управление). This caused considerable discontent amongst the local Turkmen population, as mainly Russian-populated cities such as Ashgabat appeared. The best-known Military Governor to have ruled the region from Ashkhabad was probably General Kuropatkin, whose authoritarian methods and personal style of governance made the province very difficult for his successors