At a certain point it was necessary to obtain recognition of the independence of the city, and often its constitution, from either the Pope or the Holy Roman Emperor - "free" cities in the Empire continued to owe allegiance to the Emperor, but without any intermediate rulers.
In the late Middle Ages and early modern period patricians also acquired noble titles, sometimes simply by acquiring domains in the surrounding contado that carried a heritable fief.