At the end of the 12th century Lucca and other cities of Tuscany created an alliance to fight the neighbor feudal lords and subjugate their lands. This allowed Lucca and Florence in particular to control large territories and to compete for the military supremacy in the region. The 13th century was characterised by political fights inside many communes, including Lucca. As a consequence the republic witnessed the rise of the people faction and change in government structure, as well as participating in a long series of wars between Guelphs and Ghibellines. In 1273 and again in 1277 Lucca was ruled by a guelph "capitano del popolo" (captain of the people) named Luchetto Gattilusio.