California Penal Code
Public offenses may be prevented by the intervention of the officers of justice:
1. By requiring security to keep the peace;
2. By forming a police in cities and towns, and by requiring their attendance in exposed places;
3. By suppressing riots.
When the officers of justice are authorized to act in the prevention of public offenses, other persons, who, by their command, act in their aid, are justified in so doing.