Once a Roman settlement (Matutia or Villa Matutiana),
it has expanded in the Early
Middle Ages when the population moved to the
high grounds and built a castle and a walled village
(La Pigna) to protect the city from
Saracen raids. At first subjected to the
countship of Ventimiglia, it passed later under the
dominion of the Genoese bishops, who in
1297 sold it to the Doria and De Mari families.
It became a free town in the second half of the 15th
century and spread on the Pigna hill and at San Siro,
near the Cathedral. The old village remains almost
perfectly conserved nowadays.