Suleiman the Magnificent (1520–1566) captured Belgrade in 1521, conquered the southern and central parts of the Kingdom of Hungary as part of the Ottoman–Hungarian Wars, and, after his historic victory in the Battle of Mohács in 1526, he established Ottoman rule in the territory of present-day Hungary (except the western part) and other Central European territories. He then laid siege to Vienna in 1529, but failed to take the city. In 1532, he made another attack on Vienna, but was repulsed in the Siege of Güns. Transylvania, Wallachia and, intermittently, Moldavia, became tributary principalities of the Ottoman Empire. In the east, the Ottoman Turks took Baghdad from the Persians in 1535, gaining control of Mesopotamia and naval access to the Persian Gulf. In 1555, the Caucasus became officially partitioned for the first time between the Safavids and the Ottomans, a "status quo" that would remain until the end of the Russo-Turkish War (1768–1774). By this partitioning of the Caucasus as signed in the Peace of Amasya, Western Armenia, western Kurdistan, and Western Georgia (incl. western Samtskhe) fell into Ottoman hands, while southern Dagestan, Eastern Armenia, Eastern Georgia, and Azerbaijan remained Persian.