Florence's recorded history began with the establishment in 59 BCE of a settlement for Roman former soldiers, with the name Florentia. The seat of a bishopric from around the beginning of the 4th century CE, the city experienced subsequent periods of Byzantine, Ostrogothic, Lombard, and Frankish rule, during which the population may have fallen to as few as 1,000 persons.
Reviving from the 10th century and governed from 1115 by an autonomous commune, the city was plunged into internal strife by the 13th-century struggle between the Ghibellines, supporters of the German emperor, and the pro-Papal Guelphs, who after their victory split in turn into feuding "White" and "Black" factions led respectively by Vieri de Cerchi and Corso Donati. (See Guelphs and Ghibellines.) These struggles eventually led to the exile of the White Guelphs, one of whom was Dante Alighieri. This factional strife was later recorded by Dino Compagni, a White Guelph, in his Chronicles of Florence.
Political conflict did not, however, prevent the city's rise to become one of the most powerful and prosperous in Europe, assisted by her own strong gold currency, the florin (introduced in 1252), the eclipse of her formerly powerful rival Pisa (defeated by Genoa in 1284 and subjugated by Florence in 1406), and the exercise of power by the mercantile elite following an anti-aristocratic movement, led by Giano della Bella, that resulted in a set of laws called the Ordinances of Justice (1293).
Of a population estimated at 80,000 before the Black Death of 1348, about 25,000 are said to have been supported by the city's woollen industry: in 1345 Florence was the scene of 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 came under the sway (1382-1434) of the Albizzi family, bitter rivals of the Medici. Cosimo de' Medici was the first Medici family member to essentially 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. The fact that the Medici were bankers to the pope also contributed to their rise. Cosimo was succeeded by his son Piero, who was shortly thereafter succeeded by Cosimo's grandson, Lorenzo in 1469. Lorenzo was a great patron of the arts, commissioning works by Michelangelo, 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 until his execution (1498) by the teachings of the radical Dominican prior Girolamo Savonarola, whose monomaniacal persecution of the widespread Florentine sodomy and of other worldly pleasures foreshadowed many of the wider religious controversies of the following centuries.
A second individual of unusual insight 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 also wrote the Florentine Histories, the history of the city. Florentines drove out the Medici for a second time and re-established a republic on May 16, 1527. Restored twice 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 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 was to end in defeat at the hands of France and the kingdom of Sardinia-Piedmont in 1859, and Tuscany became a province of the united kingdom of Italy in 1861.
Florence replaced Turin as Italy's capital in 1865, hosting the country's first parliament, but was superseded by Rome six years later following the latter's addition to the kingdom. After doubling during the 19th century, Florence's population tripled in the 20th 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 (Americans about 9 kilometers (6 miles) south of the city , British and Commonwealth soldiers a few kilometers east of the center on the north bank of the Arno)
In November 1966 the Arno flooded parts of the centre, damaging many art treasures. There was no warning from the authorities who knew the flood was coming, except a phone call to the jewellers on the Ponte Vecchio.
The surge in artistic, literary, and scientific investigation that occurred in Florence in the 14th-16th centuries was precipitated by Florentines' preoccupation with money and with the display of wealth and leisure.
Added to this, the crises of the Catholic church (especially the controversy over the French Avignon Papacy and the Great Schism) along with the catastrophic effects of the Black Death were to lead to a re-evaluation of medieval values, resultant in a revisitation of those of classical antiquity. Florence benefited materially and culturally from this sea-change in social consciousness.