The territory of Castel Guelfo spans the municipalities of Imola, Dozza, Castel San Pietro and Medicina. In the early 13th century, the disputes between Bologna (Guelph) and Imola (Ghibelline) for possession of this borderland saw the Bolognese government achieve supremacy.
The progressive planting of crops by the city’s bourgeois class over the 13th and 14th centuries culminated, in the early 1300s, in Bologna constructing a Castrum Guelfum, or castle, and sending a garrison to protect the settlers.
The rise of the Malvezzi family, appointed counts in 1458, and a feudal form of government put an end to Imola’s interference, resulting in a certain stability that lasted until Napoleon’s arrival in 1796. Over a period that stretched from the 1400s to the 1700s, the urban landscape gradually took shape, characterized by solid fortifications and the triangular design of the Borgo. The 19th century saw Castel Guelfo face several problems during the transition from French occupation to the unification of Italy. When Piriteo IV Malvezzi died, (1806), land ownership passed to his daughter Maria Laura, who was married to Prince Astorre Hercolani. Despite the political and administrative changes brought about by the country’s unification and twenty years of fascism, Castel Guelfo retained its unique urban identity.