When President John F. Kennedy named the week of May 15 as National Police Week, he noted that law enforcement had been protecting Americans since the nation’s birth. But in fact, the U.S. police force is not so old.
In colonial times, the closest analog was usually a volunteer night watch. Watchmen got a bad rap for drinking on duty, so when towns tried mandatory service, citizens would often pay someone else to serve instead–“ironically, a criminal or a community thug,” says Gary Potter, a crime historian at Eastern Kentucky University. The best early example of organized policing is one today’s officers might prefer not to see as a comparison point: slave patrols, the first of which was formed in the Carolina colonies in 1704.
Police forces as we would recognize them now date to the mid–19th century, the first having been created in 1838 in Boston. As the city’s commerce boomed, businesses campaigned to transfer the cost of a permanent property-protecting force to the citizenry, arguing that it was for the collective good. Other major U.S. cities followed suit, prompted in part by the rise of organized labor and the arrival of waves of immigrants. Those made anxious by such changes called for law and order. But the rise of political machines and then Prohibition opened police forces up to new kinds of corruption.
It was later, in Kennedy’s lifetime, that a movement took hold to professionalize the U.S. police force, which ultimately enabled the system we have in place today.
For more on these stories, visit time.com/history
This appears in the May 29, 2017 issue of TIME.