For reference these forts (and foundation dates) were:  Guryev (1645), Uralsk (1613), Orenburg (1743), Orsk (1735). Troitsk (1743), Petropavlovsk (1753), Omsk (1716), Pavlodar (1720), Semipalitinsk (1718) Ust-Kamenogorsk (1720). Uralsk was an old settlement of free Cossacks. Orenburg, Orsk and Troitsk were founded as a result of the Bashkir War about 1740 and this section was called the Orenburg Line. Orenburg was long the base from which Russia watched and tried to control the Kazakh steppe. The four eastern forts were along the Irtysh River. After China conquered Xinjiang in 1759 both empires had a few border posts near the current border. In 1839 Russia attempted to conquer Khiva. Vasily Perovsky marched about 5,000 men south from Orenburg. The winter was unusually cold, most of his camels died and he was forced to turn back. See Khivan campaign of 1839. Southward from the Siberian Line the obvious next step was a line of forts along the Syr Darya eastward from the Aral Sea. This brought Russia into conflict with the Khan of Kokand. In the early 19th century Kokand began expanding northwest from the Ferghana Valley. About 1814 they took Hazrat-i-Turkestan on the Syr Darya and around 1817 they built Ak-Mechet ('White Mosque') further downriver, as well as smaller forts on both sides of Ak-Mechet. The area was ruled by the Beg of Ak Mechet who taxed the local Kazakhs who wintered along the river and had recently driven the Karakalpaks southward. In peacetime Ak-Mechet had a garrison of 50 and Julek 40. The Khan of Khiva had a weak fort on the lower part of the river. Given Perovsky's failure in 1839 Russia decided on a slow but sure approach. In 1847 Captain Schultz built Raimsk in the Syr delta. It was soon moved upriver to Kazalinsk. Both places were also called Fort Aralsk. Raiders from Khiva and Kokand attacked the local Kazakhs near the fort and were driven off by the Russians.