The first document citing the town is from 967, when it was included in the Marca Aleramica created by Emperor Otto I. Later a possession of Bonifacio Del Vasto, it was inherited by the Del Carretto who made it the base of a powerful Marquisate which they enlarged absorbing the neighbouring fiefs, and which raised the hostility of the Republic of Genoa. After various disputes, in 1385 the Del Carretto were compelled to cede most of their lands to the Genoese; their rule was however not well accepted, and a true war ensued in 1447–48, which ended with a Genoese victory.