Cities in Medieval times were strange creatures. They were often governed from afar by a king or emperor and as long as his representative was satisfied no-one else was fully able to intervene in their affairs. If a noble family was in charge of a city then it functioned slightly differently. This immensely complicated topic is part of Dante’s story since in his time Florence was not run by nobility. Later the Medici became the rulers and the administration of the city is easier to understand.
However Florence for a time was a city-state and tried to run itself as a republic. Several Italian cities had this classification. There were also Free cities elsewhere in the Holy Roman Empire which are not, seemingly, the same thing. However, whatever your classification, if you couldn’t defend yourself against someone who wanted to change that classification you would lose it. A free city that fell to an invader was — no longer free.
While trying to understand this I thought about the city of Shrewsbury as pictured in Ellis Peters’ series about Brother Cadfael. The sheriff of the ‘area’ also runs Shrewsbury with parts of it being under the rule of the abbot in the nearby monastery. People who are annoyed by nobles (and under their control) can flee to the city and if not caught for a year and a day they are free. Highly dangerous enterprise. I don’t think Florence operated that way. But then, I don’t think the nobility in Italy operated like the English nobility, exactly.
For a much more intelligent description of this subject check out this blog entry.