The Ottoman conquest of Mohács in 1526 brought a decline to the previously flourishing Esztergom as well. In the Battle of Mohács, the archbishop of Esztergom died. In the period between 1526 and 1543, when two rival kings reigned in Hungary, Esztergom was besieged six times. At times it was the forces of Ferdinand I or John Zápolya, at other times the Ottomans attacked. Finally, in 1530, Ferdinand I occupied the castle. He put foreign mercenaries in the castle, and sent the chapter and the bishopric to Nagyszombat and Pozsony (that is why some of the treasury, the archives and the library survived).