 During this time, the entire area was ruled by the Holy Roman Empire, whose rulers instituted feudalism.Those entrusted to the Bishop of Bergamo territories of Treviolo already in the 12th century, but their proximity to the capital made them particularly vulnerable areas for the Guelph and Ghibelline factions, which sought to take control.The fighting reached its climax in 1405, when Treviolo was subjected to a violent attack perpetrated by the Colleoni, a Guelph family of Trezzo, which destroyed buildings and killed many inhabitants sided with the enemy faction.