The area of Mesopotamia, permanently lost to the Ottomans in 1639 is shaded. The Ottoman–Safavid War of 1623–1639 was the last of a series of conflicts fought between the Ottoman Empire and Safavid Persia, then the two major powers of the Near East, over control of Mesopotamia.