Ariz. Rev. Stat. § 13-1302
A. A person commits custodial interference if, knowing or having reason to know that the person has no legal right to do so, the person does one of the following:
C. It is a defense to a prosecution pursuant to subsection A, paragraph 2 if both of the following apply:
2. The defendant is the child's parent and has the right of custody and the defendant either:
D. Subsection A, paragraphs 2 and 3 do not apply to a person who is the child's parent if both of the following apply:
E. A violation of this section is: