The siege was part of a struggle between the Habsburgs and the Ottomans following the death of the ruler of Hungary, John Zápolya, on 20 July 1540.[2] This is part of the "Age of castle wars" in Hungarian history.[3] Suleiman had captured the cities of Buda and Pest in 1541, giving him a powerful control over central Hungary.[4] The Province (Beylerbeylik) of Buda was created in this occasion.[2]