In 1732 Nader Shah had forced Russia to return the lands in northern mainland Persia that had been taken during Peter the Great's Russo-Persian War; the Treaty of Resht furthermore permitted an alliance against the Ottoman Empire, the common enemy and, in any case, the provinces of Shirvan, Ghilan, and Mazanderan had been a net drain on the imperial treasury for the entirety of their occupation. Three years later, in 1735, conforming to the Treaty of Ganja, the remainder of the territories taken more than a decade earlier from Persia in the North Caucasus and South Caucasus were returned as well.