 In 1439 Visconti troops under Niccolò Piccinino captured it back, but Venice regained it soon.During the War of the League of Cambrai (1508), the city was fired and 366 Soavesi killed, but again in 1515 it was reacquired by Venice, which later sold the castle to the Gritti noble family.In 1797–1805 the city was under French rule.