The patron saint of Sanremo is Saint Romulus, bishop of Genoa who lived around the 5th century, who spent much of his life in the city's woods and died there as a hermit, on the slopes of nearby Monte Bignone. In his honour, the residents dedicated the very name of the city to the saint, which changed from Civitas Matuciana to Civitas Sancti Romuli: a document from 979 tells of certain families who asked Bishop Theodulf I for a plot of land at low cost, in an area already known as castrum Sancti Romuli, dedicated to the bishop «now considered a saint and venerated by the population».
The city's historic centre, La Pigna, takes its name from its distinctive «wound-up» shape, adopted for defensive reasons: it developed around the San Siro area after, in the 9th century, Saracen pirate raids forced the population to take refuge in the surrounding mountains, such as Pigna, Apricale and Seborga. The city was also the setting, in 1543, for the so-called Battle of the Parà against the Barbary pirates, at a time when the Turkish fleet threatened to besiege Nice during hostilities between France and Spain.