Copenhagen

In 1479, the University of Copenhagen was founded, and until 1771 it had its court, law, and prison.

An excerpt from the article 26 facts about Copenhagen

Only in the 18th century did the university submit to municipal jurisdiction.