Known since 1174 BC the country, originally known as Medullia, was conquered by the Romans who built a fortress and a prison. With the fall of the Roman empire it became a refuge for many inhabitants of the neighboring Roman villas.

From the ashes of the fortress, in the eleventh century a castle was constructed surrounded by walls. The Orsini turned it into a fortified castle. In 1594 it experienced its heyday becoming a principality headed by Federico Cesi, the founder in 1603 of the Accademia dei Lincei, the oldest scientific academy in the world.