18-9004. illegal reentry by certain aliens. (1) A person who is an alien commits an offense if the person enters, attempts to enter, or is at any time found in this state after the person: (a) Has been denied admission to or excluded, deported, or removed from the United States; or (b) Has departed from the United States while an order of exclusion, deportation, or removal is outstanding. (2) A violation of this section shall be a misdemeanor, except that the violation shall be a felony if: (a) The defendant’s removal was subsequent to a conviction for commission of two (2) or more misdemeanors involving drugs, crimes against a person, or both; (b) The defendant was excluded pursuant to 8 U.S.C. 1225(c) because the defendant was excludable under 8 U.S.C. 1182(a)(3)(B); (c) The defendant was removed pursuant to the provisions of 8 U.S.C. chapter 12, subchapter V; or (d) The defendant was removed pursuant to 8 U.S.C. 1231(a)(4)(B). (3) For purposes of this section, "removal" includes any agreement in which an alien stipulates to removal pursuant to a criminal proceeding pursuant to either federal or state law. (4) Law enforcement officers may enforce the provisions of this section only when a person is detained or investigated for suspected commission of an independent crime under title 18, Idaho Code, excluding this chapter, or under chapter 27, title 37, Idaho Code. (5) It shall be an affirmative defense to prosecution under this section that the defendant was not investigated for, charged with, or convicted of committing the independent crime for which the defendant was detained or investigated pursuant to subsection (4) of this section. (6) Notwithstanding any other provision of law to the contrary, a defendant shall not be eligible for deferred adjudication or withheld judgment if the defendant is charged with or convicted of an offense pursuant to this section.