 Complete the following phrase:  By the late 17th century, the Iranian Safavid dynasty, which neighbored both empires and had been one of the greatest rivals for Turkey for centuries 16th19th centuries, had been heavily declining. Taking advantage of the situation, Russia and the Ottoman Empire conquered swaths of its territory comprising contemporary Dagestan, Azerbaijan, and Northern Iran, which was taken by Peter I in the 