It is the duty of every sheriff, coroner, and every marshal, policeman, or other officer of an incorporated city, town, or village, having the power of a sheriff, when a criminal offense or breach of the peace is committed or attempted in his or her presence, forthwith to apprehend the offender and bring him or her before a judge, to be dealt with according to law; to suppress all riots and unlawful assemblies, and to keep the peace, and without delay to serve and execute all warrants and other process to him or her lawfully directed.
725 ILCS 5/107-16