§ 20.02. Unlawful Restraint
(a) A person commits an offense if he intentionally or knowingly restrains another person.
(b) It is an affirmative defense to prosecution under this section that:
(1) the person restrained was a child younger than 14 years of age;
(2) the actor was a relative of the child; and
(3) the actor’s sole intent was to assume lawful control of the child.
(c) An offense under this section is a Class A misdemeanor, except that the offense is:
(1) a state jail felony if the person restrained was a child younger than 17 years of age;
(2) a felony of the third degree if:
(A) the actor recklessly exposes the victim to a substantial risk of serious bodily injury;
(B) the actor restrains an individual the actor knows is a public servant while the public servant is lawfully discharging an official duty or in retaliation or on account of an exercise of official power or performance of an official duty as a public servant; or
(C) the actor, while in custody or committed to a civil commitment facility, restrains any other person; or
(3) notwithstanding Subdivision (2)(B), a felony of the second degree if the actor restrains an individual the actor knows is a peace officer or judge while the officer or judge is lawfully discharging an official duty or in retaliation or on account of an exercise of official power or performance of an official duty as a peace officer or judge.
(d) It is no offense to detain or move another under this section when it is for the purpose of effecting a lawful arrest or detaining an individual lawfully arrested.
(e) It is an affirmative defense to prosecution under this section that:
(1) the person restrained was a child who is 14 years of age or older and younger than 17 years of age;
(2) the actor does not restrain the child by force, intimidation, or deception; and
(3) the actor is not more than three years older than the child.