Mdina is the former capital city of Malta, but the Knights of the Order of St. John moved it away when they constructed Valletta, which was designed to be easier to defend. Above is the main gateway into the city, which is also known as Città Vecchia and Città Notabile. This isn’t the original entrance way into Mdina as it was re-constructed in 1724 with a Baroque design and it was also designed to be easier to defend.
The map at the entrance to the walled part of the city shows just how many buildings were located within it.
The city was never as well defended as Birgu, which was where the bulk of the action took place during the Great Siege, but the defences are still formidable. During the Great Siege the Ottomans did come to try and seize Mdina, but the local governor was able to fool them into thinking there were more troops than there actually were, so they decided not to attack. There’s a story that I’ve read in a few books that the governor also got the females in the city to dress up as troops, as part of the plan to pretend it was better defended than it actually was.