When the last of the Carolingian Holy Roman Emperors died in 924 AD, northern Italy – including Florence and nearby Genoa – fell under the power of the Counts of Canossa: first Boniface III, then his daughter Matilda. Florence did very well under their rule: in 1059, Florence was able to rebuild its Christian baptistery in a beautiful Romanesque style. When Matilda died without children in 1115 AD, Florence became independent, and established a republican system of government where many men (though not women) had some voting rights.
Most of the 1200s in Florence saw intense fighting between two rival political groups, the Guelphs and the Ghibellines. The poet Dante was exiled from Florence for being a Guelph. In the late 1200s, Florence began building a big new cathedral, though various problems made it take a long time to build.
Like most other cities in Eurasia, Florence suffered terribly from the bubonic plague of 1348. The writer Boccaccio, for instance, lost his stepmother and many friends. By the end of the 1300s, most of the power fell into the hands of a few rich families like the Medici. Florence did well. In 1406, with Genoa losing control of its possessions, Florence got control of Pisa. But a lot of people were angry about losing their political power.