In the Middle Ages Alcamo was largely inhabited by Muslim people, whose numbers declined after the Norman conquest of Sicily, begun in 1060. Alcamo was divided into four hamlets named San Vito, San Leonardo, Sant'Ippolito and San Nicolò del Vauso. but a series of Arab revolts between 1221 and 1243 led King Frederick II to move most of the Arab population to a colony at Lucera, while Christians from Bonifato came to inhabit the town. In this period the poet Ciullo or Cielo d'Alcamo was born. In 1340 Raimondo Peralta acquired the feud and barony of Alcamo from Peter II of Aragon. Then the barony passed to his son Guglielmo Peralta Sclafani, called "Guglielmone". and afterwards to the Ventimiglia family (up to 1397), Giaimo de Prades (1407), the Cabrera family, the Speciale family, Pietro Balsamo prince of Roccafiorita (1618) and finally to Giuseppe Alvarez (1777). In the 14th century Alcamo had several thousands of inhabitants and hundreds of them had immigrated from different parts of Sicily and Italy (in particular: Pisa, Amalfi, Bologna, Calabria, Liguria), and some also from Spain. During this period, Antonello da Messina moved to Alcamo for three years (around 1438–1441) in order to learn the tanning techniques from the tanner master Guglielmo Adragna di Alcamo, in fact the town was an important pole of development for commerce and handicraft. In particular, it had a massive exchange of wheat and wine with the nearby towns and there were also expert artisans such as bakers, blacksmiths, tanners and weavers. During this century Alcamo was an important centre for wheat storage and sorting. In the same period the writer Giacomo Adragna transcribed the Commentarii in Persium and Pietro d'Alcamo many works from the library of San Martino. Modern age At about the year 1500, Alcamo was under the jurisdiction of the captain of justice Ferdinando Vega, who fought against the raiding Turkish pirates. The town was surrounded by defensive embattled walls provided with four gates: Porta Palermo (afterwards called Porta Saccari), at the end of the present via Rossotti; Porta Corleone, at the end of the present via Commendatore Navarra; Porta di Gesù, opposite the church of Saint Mary of Jesus, next to the Franciscan friary; Porta Trapani (later called Porta del Collegio), at the beginning of via Commendatore Navarra. During this period, the town was divided into four-quarters, each one associated with the name of the main church