 Another appears in 977 AD, in which Holy Roman Emperor Otto II gave the Bishop of Pavia feudal sovereignty over a territory which included Casorate.Due to being under such a rule, the town was shielded from a lot of political affairs, even though its territory saw the 1239 battle between the Lombard League and Frederick II of Hohenstaufen, which saw the latter's defeat.Casorate Primo was referred to as an "oppidum" in the 15th century, which would suggest that it had city walls, similar to some nearby communes such as Binasco and Rosate.