Always Ghibelline, Pisa tried to build up its power in the course of the 14th century, and even managed to defeat Florence in the Battle of Montecatini (1315), under the command of Uguccione della Faggiuola. Eventually, however, after a long siege, Pisa was occupied by Florentines in 1405. Florentines corrupted the "capitano del popolo" ("people's chieftain"), Giovanni Gambacorta, who at night opened the city gate of San Marco. Pisa was never conquered by an army. In 1409, Pisa was the seat of a council trying to set the question of the Great Schism. In the 15th century, access to the sea became more difficult, as the port was silting up and was cut off from the sea. When in 1494, Charles VIII of France invaded the Italian states to claim the Kingdom of Naples, Pisa reclaimed its independence as the Second Pisan Republic.