During the Lombard period the city assumed the name of Castrum Felicitatis, while in the Middle Ages it was a free city of the Guelph faction. With the name of “Civitas Castelli”, extended its dominion over the surrounding territories up beyond the Apennines.