Ajaccio is older than its Genoese walls. A bishop sat here by 591, and the settlement stood further north, around what is now Castel Vecchio and Sainte-Lucie. In 2005 archaeologists digging on the hill of San Giovanni uncovered the baptistry of a cathedral from the 500s, so an early Christian town sat there. After the 8th century the town shrank and almost vanished, as most Corsican coastal towns did.
The present town was a Genoese project. On 21 April 1492 the Bank of Saint George sent the architect Cristoforo Gandini to build a castle on Capo di Bolo, with homes for several hundred people around it. Corsicans were kept out for some years, and the Genoese settlers kept calling themselves citizens of Genoa almost until the French conquest. The Corsicans lived outside the walls in the Borgu, whose main street was today's rue Fesch.
The French held Ajaccio from 1553 to 1559, then handed it back to Genoa. When Pasquale Paoli proclaimed the Corsican Republic in 1755, he took most of the island but could not dislodge the Genoese from their citadels, Ajaccio's among them. Genoa's way out was to sell the island to France in 1768, and royal French soldiers took over the citadel. Formal annexation followed in 1780.
Napoleon was born here in 1769, the year of the Battle of Ponte Novu. His father Carlo had been secretary to Paoli. In 1793 the family fled by ship to Toulon after the Paolists burned their estate, and they returned in 1797, when Napoleon was a general with power to shield them. As emperor he made Ajaccio capital of the new Department of Corsica in 1811, and he laid out the two main streets, Cours Napoléon and Cours Grandval.
By the 1800s the town was a winter retreat for the wealthy, the English above all, like Nice and Cannes. They got an Anglican church and a Foreigners' Quarter of villas and hotels, such as the Grand Hotel of 1869. Some of these buildings are now in bad condition, and some were pulled down for newer blocks. A darker footnote is the juvenile prison of 1855, a farm colony that closed in 1866 after sixty percent of the nearly 1,200 children held there died.
The townspeople turned on the German occupiers on 9 September 1943, and Ajaccio was the first place in France to be freed. De Gaulle came on 8 October. The resistance took its name from the maquis, the scrub on the hills above town. After 1960 the city grew fast, which is why 85 percent of homes date from after 1949, and why concrete towers stand on the heights above the old city.