In 1262, after a long struggle with the ruling bishops, its citizens gained the status of free imperial city.