They continued to use Mdina as their centre of administration but renamed it Melita after the Greek and Latin name for the island, probably taken from the main Punic port on the Grand Harbour.
[19][20] According to Al-Himyarī, Malta remained almost uninhabited until it was resettled in 1048 or 1049 by Muslims from Sicily and their slaves, who built a settlement called Madina on the site of Melite.
[18] Some aspects of present-day Mdina's layout, such as its narrow and maze-like streets, may still reflect the legacy of this period and share some similarities with historic North African medinas.
A castle known as the Castellu di la Chitati was built on the southeast corner of the city near the main entrance, probably on the site of an earlier Byzantine fort.
The area to the south that had formerly been part of Roman Melite, now situated outside the city walls, was turned into a suburb, present-day Rabat.
[25] Under Aragonese rule, local government rested on the Università, a communal body based in Mdina, which collected taxation and administered the islands' limited resources.
[28] In the 1540s, the fortifications began to be upgraded during the magistracy of Juan de Homedes y Coscon,[29] and in 1551 the city withstood a brief Ottoman siege.
[30] During the Great Siege of Malta in 1565, Mdina was the base of the Order's cavalry, which made occasional sorties on the invading Ottomans.
On 7 August 1565, the cavalry attacked the unprotected Ottoman field hospital, which led to the invaders abandoning a major assault on the main fortifications in Birgu and Senglea.
The Ottomans attempted to take Mdina in September so as to winter there, but abandoned their plans when the city fired its cannon inefficiently at a much longer range than normal, leading them to believe that it had ammunition to spare.
After the siege, Maltese military engineer Girolamo Cassar drew up plans to reduce Mdina's size by half and turning it into a fortress, but these were never implemented due to protests by the city's nobles.
[31] Mdina suffered severe damage during the 1693 Sicily earthquake; although no casualties were reported, the 13th-century Cathedral of St. Paul was partially destroyed, and it was rebuilt by Lorenzo Gafà in the Baroque style between 1697 and 1703.
[32] On 3 November 1722, newly elected Grand Master António Manoel de Vilhena issued orders for the restoration and renovation of Mdina.
[36] These events marked the beginning of a two-year uprising and blockade, and the Maltese set up a National Assembly which met at Mdina's Banca Giuratale.
The city displays an unusual mix of Norman and Baroque architecture, including several palaces, most of which serve as private homes.