When Mamluk troops captured the city from the Crusaders in 1291, they partly demolished the fortifications, but the Mamluk Sultan Barquq built a new tower on the site in the late 14th century. In the 1770s, Jazzar Pasha destroyed part of the castle but then rebuilt the tower again. In 1840 during the Egyptian–Ottoman War, the castle was bombed and damaged by a British fleet.