Whether a relationship between a 20-year-old and a 17-year-old is illegal depends almost entirely on which state you’re in. In roughly 40 states, the age of consent is 16 or 17, and the relationship itself breaks no law. In about a dozen states where the age of consent is 18, the same relationship is a felony for the older partner. And in every state, sexual images of the 17-year-old are a federal crime regardless of whether the relationship is legal where you live.
What Your State’s Age of Consent Says
Every state sets its own age of consent, and that single number decides the question. Most states place the line at 16. A smaller group sets it at 17. Roughly a dozen require both partners to be at least 18.1U.S. Department of Health and Human Services. Statutory Rape: A Guide to State Laws and Reporting Requirements
If your state’s age is 16 or 17, a 17-year-old can legally agree to sexual activity with a 20-year-old, and no crime occurs on that basis alone. If your state’s age is 18, any sexual contact between the two of you is illegal no matter how mutual the relationship feels. The law treats the 17-year-old as legally incapable of consenting, so the 20-year-old’s conduct is a sex offense even when the younger partner fully agreed. The question isn’t whether the relationship is healthy or whether the age gap seems small. It’s whether the 17-year-old has reached the number the state picked.
Because the threshold varies so much, a relationship that’s perfectly legal in one state can become a felony the moment you cross a border. Look up your specific state before anything else.
Close-in-Age Exemptions
Most states have some version of a close-in-age exemption, sometimes called a “Romeo and Juliet” provision. These rules recognize that a 20-and-17 situation isn’t the same as a 40-and-14 one. When the exemption applies, it either removes criminal liability entirely or reduces the offense to a lesser charge.
Typical exemptions cover age gaps of two to four years. A three-year gap between 20 and 17 fits the range most states allow, but not all of them. Some cap the gap at two years, which would leave a 20-year-old unprotected. Others limit the exemption to partners under a certain age, so a 20-year-old might not qualify even though a 19-year-old would. Getting the details wrong means relying on a defense that doesn’t actually exist for you.
Where exemptions do apply, they can also prevent the harshest downstream consequences. In some jurisdictions, qualifying under a close-in-age provision means the older partner avoids mandatory sex offender registration, which is often more life-altering than the sentence itself. But this protection is far from universal. Some states reduce the charge without eliminating registration, and others treat the exemption only as a factor at sentencing rather than a complete defense.
What the Charges Look Like
When a 20-year-old has sexual contact with a 17-year-old in a state where the age of consent is 18, and no close-in-age exemption applies, the charge is typically statutory rape or unlawful sexual conduct with a minor. The name varies by state. Every version shares the same core feature: the prosecution does not need to prove force, threats, or coercion. The act itself is the crime.1U.S. Department of Health and Human Services. Statutory Rape: A Guide to State Laws and Reporting Requirements
This catches people off guard. In most criminal law, the accused person’s intent and the other person’s willingness both matter. In statutory rape cases, neither does. The 17-year-old could have initiated everything, and the 20-year-old can still be convicted. Prison sentences measured in years and substantial fines are common, though for a 20-and-17 situation you’re generally in the lower range of severity compared to cases involving younger minors or wider age gaps.
Photos and Texts Are a Separate Federal Crime
This is where the law gets genuinely dangerous, and where many young couples stumble without realizing it. Federal law defines a minor as anyone under 18 for purposes of sexual images, regardless of the state’s age of consent.2Office of the Law Revision Counsel. 18 U.S. Code 2256 – Definitions for Chapter A 17-year-old who can legally have sex in your state is still a child under federal pornography statutes. Sending, receiving, or storing explicit photos of that 17-year-old is a federal felony.
The penalties are severe. Producing a sexual image of someone under 18 carries a mandatory minimum of 15 years and a maximum of 30 years for a first offense.3Office of the Law Revision Counsel. 18 U.S. Code 2251 – Sexual Exploitation of Children Distributing such images, which includes forwarding a photo by text or social media, carries a mandatory minimum of five years and a maximum of 20. Simple possession can bring up to 10 years.4Office of the Law Revision Counsel. 18 USC 2252
In practical terms, a 20-year-old whose 17-year-old partner sends them a nude photo has committed a federal crime by receiving it and another by keeping it on their phone. Forwarding it to anyone is distribution. The fact that the image was taken and sent voluntarily by the 17-year-old doesn’t matter under federal law. Some states have reduced penalties or diversion programs for sexting between people close in age, but those state-level protections don’t override the federal statute, and most are designed for situations where both parties are minors.5U.S. Department of Justice. Citizen’s Guide to U.S. Federal Law on Child Pornography
Crossing State Lines
Most sex offenses involving a 20-year-old and a 17-year-old are prosecuted at the state level. Federal authorities step in when the conduct crosses state lines. Under federal law, knowingly transporting someone under 18 across a state boundary with the intent that they engage in any sexual activity that would be criminal carries a mandatory minimum of 10 years in prison and a maximum of life.6Office of the Law Revision Counsel. 18 USC 2423
The scenario isn’t as exotic as it sounds. A 20-year-old who drives a 17-year-old from a state where the age of consent is 18 to a neighboring state for a weekend, with sexual activity as part of the plan, has potentially committed a federal offense. College students in border areas, couples visiting family across state lines, and road trips can all create federal exposure if the underlying sexual activity would violate any state’s law. Federal and state authorities can both prosecute the same conduct independently, so a federal charge doesn’t replace the state charge. It stacks on top.
Sex Offender Registration
A conviction for a sex offense against a 17-year-old typically triggers mandatory registration as a sex offender. The federal framework under the Sex Offender Registration and Notification Act sorts offenders into three tiers, and the tier controls how long you register.7Office of the Law Revision Counsel. 34 USC 20911
For a typical statutory rape conviction involving a 20-year-old and a 17-year-old with no aggravating factors, Tier I is the most likely federal classification, which means 15 years of registration, reducible to 10 after a decade of a clean record. If the case also involves sexual images of the 17-year-old, that pushes the classification to Tier II: 25 years with no reduction available. Tier III, reserved for the most serious offenses such as aggravated sexual abuse, is lifetime registration.8Office of the Law Revision Counsel. 34 USC 20915 – Duration of Registration Requirement
Registration means providing your home address, workplace, and other personal information to law enforcement and updating it regularly. Registrants face restrictions on where they can live, often being barred from residences near schools or childcare facilities. Employment options narrow sharply. Jobs involving contact with children, many government positions, and roles requiring professional licenses in healthcare, education, or law become effectively off-limits. Failing to keep your registration current is a separate criminal offense that can send you back to prison. The conviction also follows you onto background checks for housing, college admissions, and future custody disputes.
How Investigations Start
Even where the relationship is legal, certain professionals are required by law to report suspected illegal sexual activity involving a minor. Mandatory reporters typically include teachers, doctors, nurses, mental health professionals, social workers, and law enforcement personnel.9Child Welfare Information Gateway. Mandated Reporting
If a 17-year-old mentions the relationship to a school counselor, or a doctor notices signs of sexual activity during an exam, the professional may be legally obligated to file a report regardless of what they personally think. The report goes to child protective services or local law enforcement, and an investigation follows. The reporter doesn’t get to decide whether the relationship seems healthy. Their job is to report; someone else decides whether to prosecute. A mandatory reporter who fails to report can lose their license and face criminal charges of their own.
A common misconception is that if nothing happens at the time, you’re in the clear. Statutes of limitations for sex offenses involving minors are unusually long, and many states have eliminated time limits entirely. Even where a deadline exists, the clock often doesn’t start running until the victim reaches adulthood or until the offense is reported. A relationship that ends amicably at 17 and 20 can surface as a criminal case at 25 and 28 if the younger person’s perspective changes, if a therapist encourages reporting, or if the facts come out during an unrelated investigation.