(1) A person commits a class 2 felony if, while being in custody or confinement following conviction of a class 1 or class 2 felony, he knowingly escapes from said custody or confinement.
(2) A person commits a class 3 felony if, while being in custody or confinement following conviction of a felony other than a class 1 or class 2 felony, he knowingly escapes from said custody or confinement.
(3) A person commits a class 4 felony if, while being in custody or confinement and held for or charged with but not convicted of a felony, he knowingly escapes from said custody or confinement.
(4) A person commits a class 3 misdemeanor if, while being in custody or confinement following conviction of a misdemeanor or petty offense or a violation of a municipal ordinance, he or she knowingly escapes from said place of custody or confinement.
(4.5) A person commits a class 3 misdemeanor if he or she has been committed to the division of youth services in the department of human services for a delinquent act, is over eighteen years of age, and escapes from a staff secure facility as defined in section 19-1-103 (101.5), other than a state-operated locked facility.
(5) A person commits a class 1 petty offense if, while being in custody or confinement and held for or charged with but not convicted of a misdemeanor or petty offense or violation of a municipal ordinance, he or she knowingly escapes from said custody or confinement.
(6) A person who knowingly escapes confinement while being confined pursuant to a commitment under article 8 of title 16, C.R.S.:
(a) Commits a class 1 misdemeanor if the person had been charged with a misdemeanor at the proceeding in which the person was committed;
(b) Commits a class 1 misdemeanor if the person had been charged with a felony at the proceeding in which the person was committed, if in the escape the person does not travel from the state of Colorado;
(c) Commits a class 5 felony if the person had been charged with a felony at the proceeding in which the person was committed, if in the escape the person travels outside of the state of Colorado.
(7) In a prosecution for an offense under subsection (6) of this section, it shall be a defense for any person who, while being confined pursuant to a commitment under article 8 of title 16, C.R.S., escapes and who voluntarily returns to the place of confinement.
(8) A person commits a class 5 felony if he knowingly escapes while in custody or confinement pursuant to the provisions of article 19 of title 16, C.R.S.
(9) The minimum sentences provided by sections 18-1.3-401, 18-1.3-501, and 18-1.3-503, respectively, for violation of the provisions of this section shall be mandatory, and the court shall not grant probation or a suspended sentence, in whole or in part; except that the court may grant a suspended sentence if the court is sentencing a person to the youthful offender system pursuant to section 18-1.3-407. The provisions of this subsection (9) do not apply to subsection (4.5) of this section.
(10) Repealed.
(11) A person who is placed in a community corrections program for purposes of obtaining residential treatment as a condition of probation pursuant to section 18-1.3-204 (2.2) or 18-1.3-301 (4)(b) is not in custody or confinement for purposes of this section.