The origin of the town dates back to a Roman castra, called Castrum Leonis, (Lion's Castle), built to command the valley that leads to the San Pellegrino Pass, the easiest access for armies over the Apennines. The fortress later developed under the Lombard and Frank dominations.