From the 16th century onwards, the Persians and Ottomans started consolidating their authority over the entire Caucasus, and divided and consolidated most of its territory for themselves. By the mid-16th century, what is now Eastern Georgia, Dagestan, Azerbaijan, and Armenia was under Safavid Persian rule, while what is now Western Georgia fell under Ottoman Turkish suzerainty. Although Dagestan was once briefly gained by the Ottoman Turks through the Ottoman-Safavid War of 1578–1590, Dagestan and many of its Avar inhabitants stayed under Persian suzerainty for many centuries. However, many ethnic groups in Dagestan, including many Avars, retained relatively high amounts of freedom and self-rule. After losing the Caucasus briefly in the early 18th century, following the disintegration of the Safavids and the Russo-Persian War of 1722–1723, the Persians reestablished full control over the Caucasus again in the early 18th century under Nader Shah through his Caucasian campaign and Dagestan campaign. During that same time, the Avars increased their prestige by routing an army of Nader Shah at Andalal during the later stages of his Dagestan campaign. In the wake of this triumph, Umma Khan of the Avars (who reigned 1774–1801) managed to exact tribute from most states of the Caucasus, including Shirvan and Georgia.