849.
(a) When an arrest is made without a warrant by a peace officer or private person, the person arrested, if not otherwise released, shall, without unnecessary delay, be taken before the nearest or most accessible magistrate in the county in which the offense is triable, and a complaint stating the charge against the arrested person shall be laid before the magistrate.(b) A peace officer may release from custody, instead of taking the person before a magistrate, a person arrested without a warrant in the following circumstances:
(1) The officer is satisfied that there are insufficient grounds for making a criminal complaint against the
person arrested.
(2) The person arrested was arrested for intoxication only, and no further proceedings are desirable.
(3) The person was arrested only for being under the influence of a controlled substance or drug and the person is delivered to a facility or hospital for treatment and no further proceedings are desirable.
(4) The person was arrested for driving under the influence of alcohol or drugs and the person is delivered to a hospital for medical treatment that prohibits immediate delivery before a magistrate.
(5) The person was arrested and subsequently delivered to a hospital or other urgent care facility, including, but not limited to, a
facility for the treatment of co-occurring substance use disorders, for mental health evaluation and treatment, and no further proceedings are desirable.
(6) The person was arrested and subsequently delivered or referred to a public health or social service organization that provides services including, but not limited to, housing, medical care, treatment for alcohol or substance use disorders, psychological counseling, or employment training and education, the organization agrees to accept the delivery or referral, and no further proceedings are desirable.
(c) The record of arrest of a person released pursuant to paragraph (1), (3), (5), or (6) of subdivision (b) shall include a
record of release. Thereafter, the arrest shall not be deemed an arrest, but a detention only.