(a) A person commits the offense of third degree escape if he or she escapes from custody.
(b) It is a defense to a prosecution under this section that the person escaping was in custody pursuant to an unlawful arrest.
(c)
(1) Third degree escape is a Class C felony if, at the time of the escape, the person is in the custody of:
(A) The Division of Correction;
(B) The Division of Community Correction; or
(C) A law enforcement agency.
(2) Otherwise third degree escape is a Class A misdemeanor.