 After the 1821 Battle of Erzurum, both empires signed the first Treaty of Erzurum in July 1823, which confirmed the 1639 border.Also included in the treaty, was the guaranteed access for Persian pilgrims to visit holy sites within the Ottoman Empire.A series of border incidents in the 1830s again brought Persia and the Ottoman Empire to the brink of war.