Hamburg's history as a member of the medieval Hanseatic League, a free imperial city of the Holy Roman Empire, a city-state, and one of the 16 states of Germany. Before the 1871 Unification of Germany, it was a fully sovereign state. Prior to the constitutional changes in 1919, the civic republic was ruled by a class of hereditary grand burghers or Hanseaten. Though repeatedly destroyed by the Great Fire of Hamburg, the floods, and military conflicts including WW2 bombing raids, the city managed to recover and emerge wealthier after each catastrophe.