regretted the failure to reconcile religious differences before his death (1564). The arrival of the Ottomans (1526–1562) When Ferdinand I married into the Hungarian dynasty in 1521 Austria first encountered the westward Ottoman expansion which had first come into conflict with Hungary in the 1370s. Matters came to a close when his wife Anne's brother the young king Louis was killed fighting the Turks under Suleiman the Magnificent at the Battle of Mohács in 1526, the title passing to Ferdinand. Louis' widow Mary fled to seek protection from Ferdinand. The Turks initially withdrew following this victory, reappearing in 1528 advancing on Vienna and laying siege to it the following year. They withdrew that winter till 1532 when their advance was stopped by Charles V, although they controlled much of Hungary. Ferdinand was then forced to recognize John Zápolya Ferdinand and the Turks continued to wage war between 1537 and a temporary truce in 1547 when Hungary was partitioned. However hostilities continued almost immediately till the Treaty of Constantinople of 1562 which confirmed the 1547 borders. The Ottoman threat was to continue for 200 years. Redivision of the Habsburg lands (1564–1620) Ferdinand I had three sons who survived to adulthood, and he followed the potentially disastrous Habsburg tradition of dividing up his lands between them on his death in 1564. This considerably weakened Austria, particularly in the face of the Ottoman expansion. It was not until the reign of Ferdinand III (Archduke 1590–1637) that they were reunited again in 1620—albeit briefly until 1623. It was not to be until 1665, under Leopold I that the Austrian lands were definitively united. During the next 60 years the Habsburg monarchy was divided into three jurisdictions: "Lower Austria" – The Austrian Duchies, Bohemia passed to Charles II's line 1619. Maximilian II (1564–1576); Rudolf V (1576–1608); Mathias (1608–1619) "Upper Austria" – Tyrol and Further Austria, passed to Maximilian II's line 1595 (under administration of Maximilian III, 1595–1618). Ferdinand II (1564–1595) "Inner Austria" Charles II (1564–1590); Ferdinand III (1590–1637) As the eldest son, Maximilian II and his sons were granted the "core" territories of Lower and Upper Austria. Ferdinand II dying without living issue, his territories reverted to the core territories on his death in 1595, then under Rudolf V (1576–1608), Maximilian II's son. Maximilian II was succeeded by three of his sons none of whom left living heirs, so the line became extinct in 1619