Due to its strategic position in the Mediterranean Sea, Alghero was built around a fortified port, founded around 1102 by the Genoese Doria family. The Doria ruled it for centuries, apart from a brief period under the rule of Pisa (1283-84). In 1353 it was captured by the forces of the Crown of Aragon under Bernardo de Cabrera; in 1372, following several revolts, the indigenous population was expelled, and Alghero could later grow thanks to the arrival of Catalan colonists. In the early 16th century Alghero received the status of King's City (ciutat de l'Alguer) and developed economically.
The Catalano-Aragonese were followed by the Spanish Habsburgs, whose dominion, ending in 1702, brought some stylish elegance to the city. In 1720 Alghero and Sardinia were handed over to the Piedmont based House of Savoy. Around 1750 a wide channel was excavated to improve the defensive position of the peninsula. In 1821 famine led to a revolt of the population, which was bloodily suppressed. At the end of the same century Alghero was de-militarised and, during the Fascist era, part of the surrounding marshes was reclaimed and the suburbs of Fertilia and S.M. La Palma were founded. During World War II (1943) Alghero was bombed, and its historical centre suffered heavy damage. The presence of malaria in the countryside was finally overcome in the 1950s.
Since then, Alghero has become a popular tourist resort.