On 21 January 1873, Great Britain and Russia signed an agreement that stipulated that the eastern Badakhshan area as well as the Wakhan Corridor to Lake Sariqol were Afghan territory, the northern Afghan boundary was the Amu Darya (Oxus River) as far west as Khwaja Salar (near Khamyab), and a joint Russian-British commission would define the boundary from the Amu Darya to the Persian border on the Hari (Harirud) River. However, no boundary west of the Amu Darya was defined until 1885. The agreement was regarded as having defined the British and Russian spheres of influence in Afghanistan and Central Asia, gave the two sides the legitimacy to advance within their designated zones, created cordial relations between the two rival European powers, and raised the new problem of defining what were the frontiers of Afghanistan, Russia and China in the upper Oxus region in the Pamir mountains. The agreement was negotiated by Russian diplomat Prince Alexander Gorchakov, the lands of Badakhshan and Wakhan were accepted by Russia as part of Afghanistan, Russia accepted all of Britain's proposals on Afghanistan's northern borders and expected that Britain would keep Afghanistan from committing any aggression. However, this set in motion Russia's annexation of the Khanate of Khiva in the same year. Badakhshan would later be divided between Afghanistan and Russian-controlled Bukhara by the Pamir Boundary Commission in 1895.