 A Roman centre called "Cameliomagus", "Comillomagus" or "Camillomagus" existed in the area.In the Middle Ages a settlement known as San Martino di Strada (St. Martin on the Road) replaced it, which was acquired by the commune of Pavia in 1164.It had a castle which was set on fire during the war against Frederick Barbarossa.