Built by Costanzo Sforza between 1474 and 1483, Costanza Fortress is the most important fortification of the city. The project began under the engineer Giorgio Marchesi from Settignano continuing under the guidance of Cherubino from Milan. In 1500, when Cesare Borgia occupies the city, it brings in the moat of the fortress the water of the Adriatic Sea, perhaps on the advice of Leonardo da Vinci, his military engineer. Restored the Sforza domain, in 1503, Giovanni completes the moat begun by the Borgia with also the arrangement of the residences and the overall restoration. The building underwent further restoration in 1657. Transformed into a prison in 1864, the Fortress was rehabilitated in 1989 and currently is home to cultural events also linked to the "Rossini Opera Festival".