 At that time, it was a trading post and spa on the route between Rome and Ravenna, where the second largest Roman military fleet was moored, and many of the Roman legions had their winter quarters.In 540 AD, the town was raided by the Ostrogoths, a Germanic tribe that invaded Italy.The town recovered during the fourteenth century, under the patronage of the Guidi family, who surrounded it with a line of defensive walls, and developed a system of small castles (e.g.