A. A person commits escape in the second degree by knowingly:
1. Escaping or attempting to escape from a juvenile secure care facility, a juvenile detention facility or an adult correctional facility; or
2. Escaping or attempting to escape from custody imposed as a result of having been arrested for, charged with or found guilty of a felony; or
3. Escaping or attempting to escape from the Arizona state hospital if the person was committed to the hospital for treatment pursuant to section 8-291.09, 13-502, 13-3994, 13-4507, 13-4512 or 31-226, title 36, chapter 37 or rule 11 of the Arizona rules of criminal procedure.
B. Escape in the second degree pursuant to subsection A, paragraph 1 or 2 of this section is a class 5 felony, and the sentence imposed for a violation of this section shall run consecutively to any sentence of imprisonment for which the person was confined or to any term of community supervision for the sentence including probation, parole, work furlough or any other release. Escape in the second degree pursuant to subsection A, paragraph 3 of this section is a class 2 misdemeanor.