Pagazzano and specifically its castle were the object of interest in the age-old opposition between the Visconti-Sforza and the Serenissima (Republic of Venice), passing repeatedly from one state to another, without however improving the socio-economic conditions of the inhabitants of the village. The controversial issue related to the border between the two powers was defined with the construction of the Bergamasque ditch, a channel that also bordered the territory of Pagazzano, delimiting it to the east and relegating it definitively under the influence of Milan.