830.1.
(a) A Any sheriff, undersheriff, or deputy sheriff, employed in that capacity, of a county, a any chief of police of a city or chief, director, or chief executive officer of a consolidated municipal public safety agency that performs police functions, a police police, employed in that capacity, of a city, any police officer, employed in that capacity and appointed by the chief of police or chief, director, or the chief executive of a public safety the agency, of a city, a any chief of police, or police officer of a district, including district (including police officers of the San Diego Unified Port District Harbor Police, Police) authorized by statute to maintain a police department, a any marshal or deputy marshal of a superior court or county, a municipal court, any constable or deputy constable, employed in that capacity, of a judicial district, any port warden or port police special officer of the Harbor Department of the City of Los Angeles, or an any inspector or investigator employed in that capacity in the office of a district attorney, is a peace officer. The authority of these peace officers extends to any place in the state, as follows: (1) As to a any public offense committed or for which there is probable cause to believe has been committed within the political subdivision that which employs the peace officer or in which the peace officer serves. officer.
(2) If Where the peace officer has the prior consent of the chief of police or chief, director, or chief executive officer of a consolidated municipal public safety agency, or police, or person authorized by that chief, director, or officer him or her to give consent, if the place is within a city, city or of the sheriff, or person authorized by the sheriff him or her to give consent, if the place is within a county.
(3) As to a any public offense committed or for which there is probable cause to believe has been committed in the peace officer’s presence, and with respect to which there is immediate danger to person or property, or of the escape of the perpetrator of the offense.
(b) The Special agents and Attorney General and special agents and investigators of the Department of Justice are peace officers, and those assistant chiefs, deputy chiefs, chiefs, deputy directors, and division directors designated as peace officers by the Attorney General are peace officers. The authority of these peace officers extends to any place in the state where a public offense has been committed or where there is probable cause to believe one has been committed.
(c) A deputy sheriff of the County of Los Angeles, and a deputy sheriff of the Counties of Butte, Calaveras, Colusa, Del Norte, Glenn, Humboldt, Imperial, Inyo, Kern, Kings, Lake, Lassen, Madera, Mariposa, Mendocino, Merced, Mono, Plumas, Riverside, San Benito, San Diego, San Luis Obispo, San Mateo, Santa Barbara, Santa Clara, Shasta, Siskiyou, Solano, Sonoma, Stanislaus, Sutter, Tehama, Trinity, Tulare, Tuolumne, and Yuba who is employed to perform duties exclusively or initially relating to custodial assignments with responsibilities for maintaining the operations of county custodial facilities, including the custody, care, supervision, security, movement, and transportation of inmates, is a peace officer whose authority extends to any place in the state only while engaged in the performance of the duties of the officer’s respective employment and for the purpose of carrying out the primary function of employment relating to the officer’s custodial assignments, or when performing other law enforcement duties directed by the officer’s employing agency during a local state of emergency.