The cohortes urbanae (Latin meaning urban cohorts) of ancient Rome were created by Augustus to counterbalance the enormous power of the Praetorian Guard in the city of Rome and serve as a police service.
The gangs of Titus Annius Milo, Publius Clodius and others which were used by rival politicians during the Republic had been eliminated mostly due to the efforts of Pompeius Magnus.
Although political gangs were a thing of the past since effective power no longer resided in the competing factions of the Roman Senate and elected officials, some kind of police force was necessary to maintain public order and prevent civil disturbances.
[1] Their primary role was to police Rome and counteract roaming mobs and gangs that often haunted its streets during the Republic.
Unlike the Vigiles, who mostly operated at night as firefighters and watchmen, members of the urban cohorts were considered legionaries, though with higher pay than the regular legions—if not quite as much as the Praetorian Guards—and tended to receive slightly higher donatives, though not as much as the Praetorians.