What is improper sexual activity with a person in custody under PC § 39.04?
Texas Penal Code § 39.04(a)(2) makes it an offense for a correctional-facility official, employee, paid worker, or volunteer, or a peace officer, to engage in sexual contact, sexual intercourse, or deviate sexual intercourse with a person in custody. It is a second-degree felony, and a first-degree felony if the person in custody is a juvenile. Consent is not a defense.
Texas Penal Code § 39.04 sits in the chapter on abuse of office. Subsection (a)(2) — the prong this page addresses — makes it an offense for an official of a correctional facility, an employee of a correctional facility, a person other than an employee who works for compensation at a correctional facility, a volunteer at a correctional facility, or a peace officer to engage in sexual contact, sexual intercourse, or deviate sexual intercourse with a person in custody, or to coerce, solicit, or induce a juvenile in custody to engage in sexual conduct or a sexual performance. The three sexual-act terms carry the same meanings assigned by Penal Code § 21.01, the same definitions used throughout the Penal Code's sex-offense chapter.
The offense exists because of the relationship between the two people involved. A Texas appellate court put it directly: Penal Code § 39.04(a)(2) "criminalizes conduct that would ordinarily be legal" — sexual activity between adults — "based on the status of the victim as a person in custody and the status of the perpetrator as an employee of a correctional facility." Casmir Irielle v. State, 441 S.W.3d 868, 891 (Tex. App.—Houston [14th Dist.] 2014, no pet.). That framing matters for the defense, because it tells you exactly what the State must establish: not force, not lack of consent, but two specific status facts plus a defined sexual act.
This page covers only the (a)(2) sexual-activity prong. The separate (a)(1) "official violation of civil rights of a person in custody" prong — the mistreatment theory — is a distinct offense with different elements, and we address it on a dedicated page: Civil Rights of a Person in Custody Defense (§ 39.04(a)(1)). If you have been told you are under investigation, the first job is to identify which prong the agency is pursuing, because the proof, the grade, and the defense lanes diverge sharply.
- Intentionally — § 6.03
- The statute is violated when the actor "intentionally" engages in the prohibited act, so general intent under Penal Code § 6.03 applies to the conduct. Because the offense is status-plus-act rather than force-based, the State's proof is usually documentary — assignment rosters, badge and timekeeping records, housing logs, surveillance, phone and messaging records, and medical or forensic evidence — rather than a contest over whether the complainant resisted.
- A defined sexual act — § 21.01
- Sexual contact, sexual intercourse, or deviate sexual intercourse, each as defined by Penal Code § 21.01. Irielle holds that the offense is a "nature of conduct" crime, which means the jury must unanimously agree on which statutorily defined act the defendant committed; a charge that lets jurors convict without agreeing on the specific act is error. Irielle, 441 S.W.3d at 882.
- The other person was in custody — § 39.04(e)
- "Custody" covers the detention, arrest, or confinement of an adult and the detention or commitment of a juvenile to a correctional facility. For a peace officer, custody can exist without confinement: a person is detained when "a reasonable person would think that she is not free to leave," and the person need not be guilty or even accused of a crime. Pastrano v. State, 250 S.W.3d 128, 132–33 (Tex. App.—Austin 2008, no pet.).
- Penalty under § 39.04(b) — felony range
- Conviction carries a second-degree felony range of 2 to 20 years in prison and a fine up to $10,000, enhanced to a first-degree felony (5 to 99 years or life) when the person in custody is a juvenile in the custody of the Texas Juvenile Justice Department, placed in a juvenile facility, or a juvenile offender in a correctional facility. A felony conviction can carry registration exposure under Code of Criminal Procedure Chapter 62 depending on the conduct and subsection of conviction, and forecloses firearm possession under federal law.
The structural core of § 39.04(a)(2) — two status facts plus a defined act plus custody — masks the analytical depth of most contested prosecutions. Because the punishment ladder jumps from second to first degree purely on the age and custody status of the complainant, identifying that status correctly is one of the first things competent defense counsel checks. And because the proof is documentary, the institutional record — rosters, logs, surveillance, electronic evidence — tends to drive the outcome more than any single witness account.
What are the penalties under § 39.04?
Under § 39.04(b), improper sexual activity with a person in custody is a second-degree felony — 2 to 20 years in prison and a fine up to $10,000. It is a first-degree felony (5 to 99 years or life) when the person in custody is a juvenile. The grade turns on the complainant's age and custody status.
Under Penal Code § 39.04(b), improper sexual activity with a person in custody is a second-degree felony. The single most important enhancement is age: the offense is a first-degree felony when it is committed against a person in the custody of the Texas Juvenile Justice Department or placed in a juvenile facility, or against a juvenile offender detained in or committed to a correctional facility. The table at the top of this page states the ranges; the dataset is also published in machine-readable form in this page's structured data.
Beyond the statutory range, a conviction can carry registration exposure under Code of Criminal Procedure Chapter 62 depending on the conduct and subsection of conviction; that analysis is fact-specific and should be done before any plea. A felony conviction also forecloses firearm possession under federal law (18 U.S.C. § 922(g)) and, for a peace officer or a licensed correctional professional, almost always ends the career through TCOLE delicensure or facility termination. Prior felony enhancements under Penal Code § 12.42 can raise the applicable range one step or to habitual. Because the punishment ladder jumps from second to first degree purely on the age and custody status of the complainant, identifying that status correctly is one of the first things competent defense counsel checks.
What must the State prove?
To convict under § 39.04(a)(2), the State must prove four elements beyond a reasonable doubt: the accused's status, a defined sexual act, that the other person was in custody, and — for the correctional-employee theory — that the place was a correctional facility. Each element is a separate place to build a defense.
To convict under Penal Code § 39.04(a)(2), the State must prove each of the following beyond a reasonable doubt. Each element is a separate place where a defense can be built.
- 1. The defendant's status
- The accused was an official of a correctional facility, an employee of a correctional facility, a person who works there for compensation, a volunteer, or a peace officer. The Penal Code does not define "employee" for this statute, and Texas courts fill the gap with agency law: "employee" includes an agent and a servant, and the test is whether the person "was subject to the [facility's] control." Edwards v. State, 97 S.W.3d 279, 289–90 (Tex. App.—Houston [14th Dist.] 2003, pet. ref'd). A contract transport agent who followed booking procedures and acted in lieu of deputies was held to be an "employee" of the jail. The flip side is a defense: where the accused was an independent contractor not subject to facility control, or never held the charged status at the relevant time, the status element fails.
- 2. A defined sexual act
- Sexual contact, sexual intercourse, or deviate sexual intercourse, each as defined by Penal Code § 21.01. Irielle holds that the offense is a "nature of conduct" crime, which means the jury must unanimously agree on which statutorily defined act the defendant committed; a charge that lets jurors convict without agreeing on the specific act is error. Irielle, 441 S.W.3d at 882. That unanimity rule is a live defense and appellate issue when the State alleges multiple acts in a single count.
- 3. The other person was in custody
- "Custody" under Penal Code § 39.04(e) covers the detention, arrest, or confinement of an adult and the detention or commitment of a juvenile to a correctional facility. For a peace officer, custody can exist without confinement: a person is detained when "a reasonable person would think that she is not free to leave," and the person need not be guilty or even accused of a crime. Pastrano v. State, 250 S.W.3d 128, 132–33 (Tex. App.—Austin 2008, no pet.). Whether custody existed at the moment of the alleged act is frequently the contested question.
- 4. The location was a correctional facility (status prong)
- For the correctional-employee theory, the place must be a "correctional facility" as defined by Penal Code § 39.04(e), which incorporates Penal Code § 1.07(a)(14) and, since a 1999 amendment, reaches both adult and juvenile facilities and certain immigration-detention and secure juvenile facilities. Pastrano, 250 S.W.3d at 130–31. A privately operated facility still counts where the operator stands in the place of the State, as Edwards illustrates.
The mental state runs through the conduct: the statute is violated when the actor "intentionally" engages in the prohibited act, so general intent under Penal Code § 6.03 applies. Because the offense is status-plus-act rather than force-based, the State's proof is usually documentary — assignment rosters, badge and timekeeping records, housing logs, surveillance, phone and messaging records, and medical or forensic evidence — rather than a contest over whether the complainant resisted.
How prosecutors build these cases
Most § 39.04(a)(2) prosecutions begin inside the institution, not with a 911 call. An inmate grievance, a recorded jail call, an intercepted note, or a contraband phone triggers an internal-affairs or Inspector General referral. The institutional record cuts both ways.
Most Penal Code § 39.04(a)(2) prosecutions begin inside the institution, not with a 911 call. An inmate grievance, a positive pregnancy test, a recorded jail call, an intercepted note, a tip from another detainee, or a contraband phone triggers an internal-affairs or Office of Inspector General referral. The investigators who build the case usually have access the defense does not: facility surveillance, the kiosk and commissary trails, the visitation logs, and the accused's own duty assignments. That institutional record cuts both ways. It can place an employee near a housing unit at a particular time, but it can also exclude the accused from the location, contradict the complainant's timeline, or show that the accused was never assigned to that detainee at all.
Custodial settings also generate a specific credibility dynamic. A person in custody may have powerful incentives to make an allegation — a housing transfer, leverage in their own case, a civil claim, retaliation against an officer who wrote a disciplinary report, or relief from a grievance. None of that makes every allegation false, and a respectful defense never assumes it does. But it does mean the complainant's account has to be tested against the hard institutional record rather than accepted on its face, and it means the timing and sequence of the allegation — what the complainant gained, and when — are fair subjects of cross-examination. Texas courts police prosecutorial overreach in this area: a prosecutor may not tell the jury during argument that he has special "expertise" about prison life to bolster a contested fact. Irielle, 441 S.W.3d at 906.
Because the conduct is often charged as several acts over time, the State will sometimes load multiple alleged incidents into one count. Irielle's unanimity holding is the answer to that tactic. When the indictment and the jury charge do not require agreement on a single act, the defense has both a trial objection and a preserved appellate issue.
Defense strategies against a § 39.04 charge
There is no single template; the defense is engineered from the four elements and the institutional record. The lanes that recur in custodial-misconduct cases in North Texas are status, custody, proof of the act, jury-unanimity, identity and access, and suppression.
There is no single template; the defense is engineered from the four elements and the institutional record. The lanes below are the ones that recur in custodial-misconduct cases in North Texas.
- Status was not what the State alleges. If the accused was an independent contractor not subject to the facility's control, a vendor with no custodial role, or a person who did not hold the charged status when the act allegedly occurred, the first element fails. Edwards's control test is the framework, and it is genuinely contestable for contractors, volunteers, and outside professionals.
- Custody did not exist at the relevant moment. For peace-officer cases especially, whether the complainant was "in custody" when the alleged act occurred is a real question under Pastrano. A consensual encounter that occurred entirely outside any detention — before a stop, after a release, away from any show of authority — is not this offense.
- The act did not happen, or the State cannot prove it happened. Where the case rests on a single uncorroborated account, the defense is built on the absence of forensic, medical, video, or electronic corroboration, on physical impossibility shown by the duty roster and surveillance, and on the institutional record that contradicts the alleged time, place, or assignment.
- Jury-unanimity and charge error. Under Irielle, a count alleging multiple acts must be charged so the jury agrees on one. A defective charge is both a basis to push for an acquittal on a thin act and a preserved appellate issue.
- Identity and access. Contraband-phone and messaging cases turn on who actually sent what. Shared logins, mis-attributed kiosk accounts, and unverified phone attribution are all attack points, and they require independent forensic review of the State's digital evidence rather than acceptance of the agency's summary.
- Suppression and procedure. Statements taken from an employee during a compelled administrative interview may be subject to challenge before they are used in the criminal case, and search or seizure of a personal phone or vehicle can present Fourth Amendment issues. These are evaluated case by case.
One affirmative defense deserves a clear, accurate statement. Penal Code § 39.04 provides a narrow defense where the actor and the person in custody were married to each other; that defense is rare in practice because Texas does not run conjugal-visitation programs, and it does not cure separate facility-rule or other criminal exposure. We assess it where the facts support it and do not oversell it where they do not.
Why consent is not a defense
Section 39.04(a)(2) has no consent element. Unlike sexual assault under § 22.011, this statute criminalizes the conduct because of the custodial relationship itself. An inmate who initiated the contact, or a relationship both parties call voluntary, does not give the accused a defense.
This is the point clients most often misunderstand, so it is worth stating plainly. Penal Code § 39.04(a)(2) has no consent element. Unlike sexual assault under sexual assault (Penal Code § 22.011), which is built around the absence of the other person's consent, this statute criminalizes the conduct because of the custodial relationship itself. The reason, as Irielle explained, is that the offense "criminalizes conduct that would ordinarily be legal" based purely on the two parties' status — one in custody, one an employee or officer with authority over them. 441 S.W.3d at 891. The law treats the power disparity as making meaningful consent impossible in that setting.
Practically, that means three things. An inmate or detainee who initiated the contact does not give the accused a defense. A relationship the parties both describe as voluntary does not give the accused a defense. And the complainant's prior conduct or reputation is not a path to a consent argument, because consent is simply not in the statute. The defense in these cases is not "they agreed." It is whether the State can prove the status, the custody, and the act at all — and that is where competent defense work concentrates.
County-by-county practice notes
Where a custodial-misconduct case is filed depends on which facility and which agency are involved — a county-jail case, a state-jail or TDCJ case, a juvenile-facility case, and an immigration-detention case can each route differently across the North Texas counties we serve.
Our firm is in Frisco and defends these cases across the North Texas counties we serve. Where a custodial-misconduct case is filed depends on which facility and which agency are involved — a county-jail case, a state-jail or TDCJ case, a juvenile-facility case, and an immigration-detention case can each route differently.
In Collin County, felony cases are handled at the Collin County Courthouse (the Russell A. Steindam Courts Building) in McKinney, with the District Attorney's Office screening jail-conduct referrals that come out of the Collin County Detention Facility. In Dallas County, felony matters are heard at the Frank Crowley Courts Building, and the volume of custodial facilities in the county means internal-affairs and Sheriff's referrals are a regular source of these filings. In Denton County, cases are filed and heard at the Denton County Courts Building complex in Denton. In Tarrant County, felony cases are handled at the Tim Curry Criminal Justice Center in Fort Worth. We do not represent that any county follows a fixed policy on these cases, and we do not invent local statistics; what we do is read the specific facility's records, the specific agency's investigation, and the specific court's docket practice for the case in front of us.
Collateral consequences
A § 39.04(a)(2) case reaches past the courtroom: TCOLE delicensure or facility termination, possible Chapter 62 registration depending on the conduct, federal and state firearm prohibition, immigration exposure for non-citizens, and parallel civil claims against the individual and the institution.
A Penal Code § 39.04(a)(2) case reaches well past the courtroom. Licensing and employment: for a peace officer, a felony conviction means TCOLE license revocation and the end of law-enforcement work; for a correctional officer, nurse, or other licensed professional inside a facility, the licensing board will act and the facility will terminate. Registration: depending on the conduct and the subsection of conviction, Code of Criminal Procedure Chapter 62 sex-offender registration may attach, and that determination must be made before any plea. Firearms: a felony conviction triggers the federal prohibition under 18 U.S.C. § 922(g) and the state prohibition under Penal Code § 46.04. Immigration: for a non-citizen, an offense of this nature can be a crime involving moral turpitude and, where a minor is involved, may carry far more severe immigration consequences; immigration analysis should be done by qualified counsel before any plea. Civil exposure: the complainant may pursue a parallel civil claim against the individual and the institution, which is an additional reason to coordinate the criminal defense with any civil and employment proceedings rather than letting them run on separate tracks.
How § 39.04 differs from neighboring offenses
Custodial-misconduct allegations are frequently charged alongside, or confused with, sexual assault, official oppression, the (a)(1) civil-rights prong, and improper relationships of authority. Sorting them out early shapes the defense.
Custodial-misconduct allegations are frequently charged alongside, or confused with, other offenses. Sorting them out early shapes the defense.
- Sexual assault — sexual assault (Penal Code § 22.011). Built on absence of consent. The State sometimes charges both Penal Code § 39.04(a)(2) and sexual assault from the same incident; the defenses differ because consent matters to one and is irrelevant to the other.
- Official oppression — official oppression (Penal Code § 39.03). The misuse-of-office mistreatment offense for public servants. It overlaps factually with custodial cases but is a different statute with different proof and a lower grade.
- The (a)(1) civil-rights prong of this same statute. The mistreatment theory under Penal Code § 39.04(a)(1) is a separate offense from the (a)(2) sexual-activity prong covered here. We address it on a dedicated page: Civil Rights of a Person in Custody Defense.
- Improper relationship between educator and student — Penal Code § 21.12. A different status offense for school employees and students; not a custodial-facility offense, but conceptually adjacent because it, too, criminalizes conduct based on a relationship of authority.
- Federal civil-rights exposure. Where a peace officer is involved, the same facts can draw federal attention under the civil-rights statutes; the federal/state question should be assessed at the outset.
- Improper sexual activity with a person in custody (§ 39.04(a)(2))
- A correctional-facility official, employee, paid worker, or volunteer, or a peace officer, who engages in sexual contact, sexual intercourse, or deviate sexual intercourse with a person in custody. A second-degree felony; first-degree if the person in custody is a juvenile.
- In custody
- The detention, arrest, or confinement of an adult, or the detention or commitment of a juvenile to a correctional facility. For peace officers, detention exists where a reasonable person would not feel free to leave; the person need not be guilty (Pastrano, 250 S.W.3d at 132–33).
- Employee of a correctional facility
- Not statutorily defined for § 39.04; Texas courts read it to include an agent or servant subject to the facility's control, which can reach contract and private-vendor staff (Edwards, 97 S.W.3d at 289–90).
- Nature-of-conduct offense
- A classification meaning the jury must agree unanimously on which specific statutory act occurred; a charge permitting a non-unanimous verdict is error (Irielle, 441 S.W.3d at 882).
