Of a population estimated at 80,000 before the Black Death of 1348, 25,000 were supported by the wool trade: in 1345 there was an attempted strike by wool combers (ciompi), who in 1378 rose up in a brief revolt against oligarchic rule in the Revolt of the Ciompi. After their suppression, the city was for some decades (1382-1434) under the sway of the Albizzi family, rivals of the Medici. Cosimo de' Medici was the first Medici family member to control the city from behind the scenes, his power coming from a vast patronage network and his alliance to the new immigrants, the "gente nuova". Cosimo was succeeded by his son Piero, who was in 1469 succeeded by Cosimo's grandson, Lorenzo, a great patron of artists including Michel Angelo, Leonardo da Vinci and Botticelli.
After Lorenzo's death in 1492 and his son Piero's exile in 1494, the first period of Medici rule ended with the restoration of a republican government, influenced by the teachings of the radical Dominican prior Girolamo Savonarola, whose persecution of worldly pleasures anticipated the religious contrasts of the following centuries. Savonarola was executed in 1498. Another great FLorentine of this time was Niccolò Machiavelli, whose prescriptions for Florence's regeneration under strong leadership have often been seen as a legitimisation of political expediency and even malpractice. Commissioned by the Medici, Machiavelli wrote the Florentine Histories. The city drove out the Medici for a second time and re-established a republic on May 16, 1527. Restored with the support of both Emperor and Pope, the Medici in 1537 became hereditary dukes of Florence, and in 1569 Grand Dukes of Tuscany, ruling for two centuries. Only the Republic of Lucca (later a Duchy) was independent from Florence in all Tuscany.
The extinction of the Medici line and the accession in 1737 of Francis Stephen, duke of Lorraine and husband of Maria Theresa of Austria, led to Tuscany's inclusion in the territories of the Austrian crown. Austrian rule ended in 1859, and Tuscany was included in the kingdom of Italy in 1861.
Florence replaced Turin as Italy's capital from 1865 until 1870. After doubling during the 19th century, Florence's population tripled in the 20th century with the growth of tourism, trade, financial services and industry. During World War II the city experienced a year-long German occupation (1943-1944). The Allied soldiers who died driving the Germans from Tuscany are buried in cemeteries outside the city.

