This is the link: https://worxintheory.wordpress.com/2014/12/07/origins-of-the-police/
It is the first thing that comes up when you google "origin of police."
Is civil unrest not an example of crime? Is there "real" crime and what the capitalist class deems crime? I'm not sure how the author of this article is defining his terms. Obviously this article is politically motivated and based on a very limited sampling of the sources.
I can speak to the situation in the American South. He cites Richard C. Wade, Slavery in the Cities, which is a good old source. Another good old source would be John Hope Franklin, The Militant South, which deals more directly with the issue of policing slaves. The author of this article singles out Charleston for some reason, but the pattern was the same in all Southern cities. He's correct that the evolution of urban patrols/police/town watchmen/fire departments/watchhouses/jails/streetlights were all tied to the relative freedom which slaves and free blacks had in cities and the threats which thereby arose. The biggest threats were self-hire, buying and selling stolen goods (especially alcohol), drinking alcohol, gambling, assemblies, arson, and of course insurrection.
Police forces emerged organically, gradually, and piecemeal. And yes, it was mainly about curtailing slave behavior. Let's do a timeline for Lexington, Kentucky:
1796--Town watch first established, primarily to snoop on "unlawful assemblies of slaves."
1798--State slave code prevents self-hire.
1800--Watchmen ordered to crack down on assemblies and self-hire.
1803--The town hires four permanent patrollers, again for the purpose of dispersing "unlawful assemblies of negroes."
1810--Town again has to hire a patroller to enforce laws regarding slaves and alcohol sales.
late 1810--crisis over supposed slave insurrection plot. For about a month, 30 privates from various militia companies patrol the town. This includes "Cavalry and the Light Infantry."
1811--new state slave code which allows Lexington town trustees, for the first time, to have direct control over their own policing. First fire company, to guard against arson by slaves.
The point is that if you look at the rationale given by the town fathers for each of these measures, you see that the creeping emergence of the modern cop grows out of urban slavery issues. My question is why this doesn't constitute "fighting crime."
I can't speak to the American situation, but its worth noting that policing in the UK is traditionally been very decentralized. So, for instance, Glasgow's motives for setting up the City of Glasgow Police in 1800 might be very different from London's motives for setting up the Met in 1829.