How did police departments form
As societies became more urban and cities grew, maintaining security became a major priority for governments. Although threats in the ancient world and late antiquity were seen as external, it was also internal unrest that threatened cities and kingdoms. The development of policing was an important change that allowed cities to become safe enough to grow and prosper, but that history and its origin are complex.
In Mesopotamia and Egypt, by the 3rd millennium BCE, local officials appeared to have been tasked with rounding up criminals and bringing them to justice. The appearance of the first law codes during this time suggest crime was prevalent in cities and as urban places grew we begin to see an enforcement body, entrusted to local government officials, in charge with bringing in criminals and others who might have committed given crimes.
We learn more about the development of policing from ancient Greece. Although the term "police" derives from Greek origins, the concept of a formal, civil force patrolling a city had not fully developed yet. Rather, the task of keeping relative calm and security in a city was something that was outsourced to slaves or servants who belonged to given officials. The Scythians were an ethnic group that came from Russia and Central Asia; some of these groups settled in Greece and warriors and slaves from these populations began to be used by city magistrates as law enforcement. The magistrates were responsible in using this force but most likely these policing forces also spied on the urban population to help maintain government control.
The city of ancient Rome probably had one of the most extensive ancient policing forces, as the city's ancient size may have reached over a million inhabitants. Similar to Greece, magistrates used slaves to patrol and maintain order in Rome. Authority may have been problematic, as slaves were not seen as being able to give binding decisions such as who to arrest. Slaves, therefore, had to utilize the authority of their magistrates, and assume that their authority had credibility, in order to enforce their actions. By the period of Augusts in the late first century BCE and first century CE, the city of Rome developed the so-called vigiles, who acted as a group that were responsible for safety, security, and fire suppression (i.e, acted as a fire department). Similar to earlier Greek system, the vigiles were privately owned slaves tasked with enforcing civil order.
In ancient China, the development of the prefecture system by the mid-first millennium BCE, during the so-called Spring and Autumn period, included prefects given the responsibility with internal security in their regions. They became responsible in raising a force and enforcing an arrests for criminals. During the Tang dynasty, law enforcement became organized into a force called the Gold Bird Guards. This force was responsible in making arrests and was also assisted by citizens, who were expected to assist in arrests. The guards were composed of citizens, but the force was more akin to a military unit.
In the Medieval period, policing began to emerge from municipalities that faced increasing crime and banditry in areas where kings could not or did not send soldiers or guards to protect citizens. One development during the Anglo-Saxon period and later was the concept of sheriff, a government official in charge of a shire or county. The office derives from a revee, who were officials responsible in a shire for security. Their jobs were to maintain order in shires and security, while also carrying out the will of the king in enforcing the law. This effectively became a type of local law enforcement, but it also had responsibilities that went beyond what we would consider modern policing. Furthermore, policing was often the responsibilty of town, where local towns would often band together and form groups to protect travelers on roads and citizens. Local lords and nobles were also responsible for maintaining order in their lands. Constables were sometimes employed to help enforce laws in shires, villages, and towns. Their importanc increased in the later Medieval period. 
The Santa Hermandades were one such group created in Spain who often kept pilgrims and others safe on roads. They were an association of individuals who saw their task was to keep order and security, particularly for pilgrims traveling. Protective councils largely maintained the authority and power to protect citizens in many regions throughout Europe. In France, the positions of the Constable and Marshal of France were military positions that were also responsible for internal security, similar to a military police type duties seen today with more common policing powers. These officials were responsible for repelling internal strife but also keeping peace in the cities and highways of the country.
To a large extent, policing remained ad hoc for much of the Medieval period. In the 17th century, with religious wars rampant in Europe, new forces were created that became responsible for policing in England and France. The term "police" is used during the period of the English Civil War, as a force to protect citizens and maintain order was created during a period of instability. In Paris, the first dedicated police department was created in 1667. The responsibility of the department was to protect citizens and remove any threat of disturbances. Similar to what happened in Rome, it was population increase and rise of crime that led to the development and impetus to create a more organized force to police the city. The police were led by a police lieutenant who was assisted by commissioners that maintained control of different districts within Paris. This system by the late 17th century was extended to the entire country, creating effectively the first national police force.
In Britain, unofficial positions such as watchmen in towns, that had developed in the Medieval period, began to become more formalized in the 18th century, where watchmen began being paid (Figure 1). The position of constable became more professional and became more official government positions. The night watchmen became regulated through an act of Parliament by 1737. The act specified how many constables should be on duty during any given night for the city of London. The Bow Street Runners effectively became London's first paid police force in 1749. This was a group of men who would use funds given by the government to help solve crimes and keep peace. This force had an office where citizens would come to report offenses. In effect, the police force acted more like detectives, while constables continued to serve as something comparable to police patrols. In effect, policing became distinguished into branches that involved investigations and protection.
By the early 1800s, London became the largest city and had continued to grow. Its existing policing was severely constrained for the growing population. The Metropolitan Police act of 1829 established London's police force, which became known as Scotland Yard (Figure 2). The police in London were distinctly organized to look different from the military, where they were not issued weapons and had very different uniforms. The 1835 Municipal Corporations Act then began to broaden policing throughout Britain by expanding policing to 178 boroughs, creating now a national effort for policing. This and the French model then became the models in which other states began to develop their major urban and national policing forces.
Ever since populations began to concentrate in urban regions, policing became a major issue for urban societies. In periods of instability, important changes became established, such as more organized posts and informal agreements that formed organized protection in regions. Nevertheless, policing was not formally developed until the 17th century in Paris and and early 19th century in Britain. It was the rapid growth of Paris and London that forced the creation of formal and dedicated police officers. In the 18th century, policing began to diverge into formal and professional roles for investigations as well as protection of citizens.
- For more on Mesopotamian and Egyptian policing efforts, see: Stevens, D. J. (2009). An introduction to American policing. Sudbury, Mass: Jones and Bartlett Publishers, pg. 41.
- For more on policing in ancient Greece, see: Wiedemann, T. (1994). Greek and Roman slavery (Reprinted). London: Routledge, pg. 148.
- For more on ancient Rome's policing, see: Dempsey, J. S., & Forst, L. S. (2016). An introduction to policing (Eighth edition). Boston, MA, USA: Cengage Learning, pg. 3.
- For more on ancient Chinese policing, see: York, W. H. (2012). Health and wellness in antiquity through the Middle Ages. Santa Barbara, Calif: Greenwood, pg. 132.
- For more on policing in the Medieval period, see: Siegel, L. J., & Worrall, J. L. (2015). Essentials of criminal justice (Ninth edition). Stamford, CT, USA: Cengage Learning.
- For more on the Santa Hermandades, see: Constable, O. R., & Zurro, D. (Eds.). (2012). Medieval Iberia: readings from Christian, Muslim, and Jewish sources (2nd ed). Philadelphia: University of Pennsylvania Press, pg. 252.
- For more on Constable and Marshal of France, see: Allmand, C. T. (Ed.). (2000). War, government and power in late medieval France. Liverpool: Liverpool University Press.
- For more on how Paris developed its policing, see: Roth, M. P. (2011). Crime and punishment: a history of the criminal justice system (2nd ed). Australia ; Belmont, CA: Wadsworth/Cengage Learning, pg. 210.
- For more on policing changes in the 18th century in Britain, see: Beattie, J. M. (2012). The first English detectives: the Bow Street Runners and the policing of London, 1750-1840. Oxford ; New York: Oxford University Press.
- For more on the development of the Metropolitan Police, see: Shpayer-Makov, H. (2011). The ascent of the detective: police sleuths in Victorian and Edwardian England. Oxford ; New York: Oxford University Press.