In 1388, the city of Bologna, having acquired the vicariate of Imola from the pope, ordered the construction of a new castle along Via Emilia, a free borough guarding the border with Faenza. The castle and its hydraulic systems were designed by top-level builders sent from Bologna, such as Lorenzo da Bagnomarino and Giovanni da Siena, under the supervision of Antonio di Vincenzo, master of Bolognese Gothic architecture.
The castle originally featured simple wooden and earthen defensive structures, including a palisade with corner towers, a movable entrance bridge, a bell tower, and a moat fed by waters from the Senio via the sluice later known as Diga Steccaia. By 1391, the church of San Petronio is already recorded at the center of the castle. That same year marked the start of construction of the rocca, a quadrangular masonry fortification built purely for military purposes, located in the northwest in a raised position relative to the rest of the settlement. Later, the castle’s access area was strengthened with the construction of a gate-tower, later known as the Clock Tower, which survived until 1945, when it was destroyed by bombing. The Civic Museum still preserves one of its clock hands.
The early 15th century saw the growth of the settlement with the formation of a borough along Via Emilia, outside the castle, reflecting the effective repopulation of the countryside following its foundation. In 1425, the construction of a new defensive wall began, crucial for protecting the borough, which was enclosed within a few years, and to better withstand the latest firearms. The new brick walls included circular towers at the corners of the perimeter, three of which have survived, particularly the eastern tower, later known as the Hospital Tower. The fortification project was promoted by Louis Aleman, Archbishop of Arles and papal legate to Bologna for Pope Martin V, as commemorated by an inscription under the portico of the Town Hall.
The 15th-century defenses were demolished in 1501 at the behest of Cesare Borgia, known as il Valentino, during his conquest of Romagna. The Tower and the section of wall near the former hospital are the best preserved and represent a glorious and historically rich past for the local community.
The perimeter of the ancient rocca today forms the majestic frame of a picturesque part of the borough in the Piazzale Roma area. The remains reveal the polylobed shape acquired during the 16th-century reconstruction, when the medieval fort was equipped with circular towers on the sides to strengthen its structure.