Did a 'City Watch' such as is common in Medieval Fantasy ever really exist in Medieval Europe?

by lukemacu

Obviously 'Europe' is a big area and 'Medieval' quite a long time period, but do we have any evidence of a fantasy-style City Watch whose purpose was mainly law enforcement and defence of the city at any point anywhere? I have seen some say that law enforcement as we know it (that is to say, not just the military being used to keep the peace) is a relatively new thing and yet the idea of a City Watch seems quite ubiquitous. For reference in Medieval Fantasy I'm thinking of, say, the Gold Cloaks from GoT or the Night's Watch from Discworld.

Georgy_K_Zhukov

Always more to be said, but do check out this answer from a similar question, done by /u/gadarn.