From the second half of the 12th century the castle of Collegalli, also, was involved in the events relating to the Swabian presence in upper Tuscany. Like many other castles around San Miniato—for example, Barbialla, another fortified village of the Gherardeschi in Val d'Egola—also the castle of Collegalli was granted in fiefdom by the Emperor to the Pisan allies. The beginning of the 13th century, however, saw the unstoppable rise of San Minato: in the course of a few decades, all the castles of the area entered to become part of the territory of the powerful imperial castle with urban vocation, which became barycentric in relation to the other small demographic centers of the area. The history of the castle of Collegalli followed, therefore, that of San Miniato, which already by the end of the 13th century found itself in conflict with the expansionist ambitions of the city of Florence. In this area, singularly dense with castles old and new, strongholds, and other types of fortified residences, the maintenance of a settlement and of its fortifications represented, in the politics of the dominant future, the city of Florence, the maintenance of the balances of the populating of the area. On the other hand, the decision to definitively destroy and dismantle one of these centers meant drastically redefining the lines of that equilibrium. It happened, in fact, that in 1364, in the process of penetration into the territory of San Miniato, Florence ordered the total destruction of the castle of Toiano, including the houses. Florence also ordered that any items that could be useful for saving (objects, tools, food supplies) were to be transferred to Collegalli. Five years later, in 1369, following the definitive submission of San Miniato to the City of the Lily, Collegalli officially became part of the Florentine contado. From the administrative point of view, Collegalli, together with castles of Santo Stefano and Coiano, was included in the podesteria of Barbialla. In the Grand Duchy period, the podesteria of Collegalli and Barbialla was suppressed and reunited with the podesteria of Montaione, whose jurisdiction was expanded under Cosimo I to include fractions of the current municipalities of Castelfiorentino and San Miniato.