Read more from Slate’s Sex Issue.

In Georgia, 21-year-old Genarlow Wilson is serving a mandatory 10-year jail sentence for aggravated child molestation. His crime: When he was 17, he had oral sex with a 15-year-old girl. In Utah, polygamist leader Warren Jeffs has been convicted as an accomplice to rape for orchestrating a sexually coercive marriage between a 14-year-old girl and her 19-year-old cousin. In Michigan, a 53-year-old prosecutor is in custody on charges of entering the state to have sex with a 5-year-old girl.

This is the reality of sex with minors: The ages of the parties vary widely from case to case. For more than a century, states and countries have been raising and standardizing the legal age of consent. Horny teenagers are being thrown in with pedophiles. The point of this crackdown was to lock up perverts and protect incompetent minors. But the rationales and the numbers don’t match up. The age of majority and the age of competence are coming apart. The age of competence is fracturing, and the age of female puberty is declining. It’s time to abandon the myth of the “age of consent” and lower the threshold for legal sex.

The original age of consent, codified in English common law and later adopted by the American colonies, ranged from 10 to 12. In 1885, Britain and the states began raising the age to 16, ostensibly to protect girls’ natural innocence. This moral idea was later bolstered by scientific reference to the onset of puberty.

But the age of puberty has been going the other way. Over the past 150 years in the United States and Europe, the average age of menarche—a girl’s first period—has fallen two to four months per decade, depending on the country. In 1840, the age was 15.3 years. By the early 1980s, it was 12.8. At first, the trend was driven by nutrition, sanitation, and disease control. Recently, some analysts thought it had stopped. But dietary changes and obesity may be pushing it forward again. Two years ago, researchers reported that the average age of menarche among American girls, which had declined from 12 years and 9 months in the 1960s to 12 years and 6 months in the 1990s, was down to 12 years and 4 months by the beginning of this decade. Among black girls, average menarche was occurring about three weeks after their 12th birthday.

Getting your period doesn’t mean having sex right away. But earlier puberty does, on average, mean earlier sex. According to the most recent data from the U.S. government’s Youth Risk Behavior Survey, one of every three American ninth graders has had intercourse. And that’s not counting the millions of teens who have had oral sex instead.

Having sex at 12 is a bad idea. But if you’re pubescent, it might be, in part, your bad idea. Conversely, having sex with a 12-year-old, when you’re 20, is scummy. But it doesn’t necessarily make you the kind of predator who has to be locked up. A guy who goes after 5-year-old girls is deeply pathological. A guy who goes after a womanly body that happens to be 13 years old is failing to regulate a natural attraction. That doesn’t excuse him. But it does justify treating him differently.

I’m not saying 12 should be the official age of “consent.” Consent implies competence, and 12-year-olds don’t really have that. In a forthcoming review of studies, Laurence Steinberg of Temple University observes that at ages 12 to 13, only 11 percent of kids score at an average (50th percentile) adult level on tests of intellectual ability. By ages 14 to 15, the percentage has doubled to 21. By ages 16 to 17, it has doubled again to 42. After that, it levels off.

By that standard, the age of consent should be 16. But competence isn’t just cognitive. It’s emotional, too. Steinberg reports that on tests of psychosocial maturity, kids are much slower to develop. From ages 10 to 21, only one of every four young people scores at an average adult level. By ages 22 to 25, one in three reaches that level. By ages 26 to 30, it’s up to two in three.

Steinberg concludes that “risk-taking increases between childhood and adolescence as a result of changes around the time of puberty in the brain’s socio-emotional system.” In tests, these tendencies peak from ages 13 to 16. Subsequently, “[r]isk-taking declines between adolescence and adulthood because of changes in the brain’s cognitive control system—changes which improve individuals’ capacity for self-regulation.” The latter kind of competence doesn’t reach adult levels until the mid-20s.

Lay out these numbers on a timeline, and you have the beginnings of a logical scheme for regulating teen sex. First comes the age at which your brain wants sex and your body signals to others that you’re ready for it. Then comes the age of cognitive competence. Then comes the age of emotional competence. Each of these thresholds should affect our expectations, and the expectations should apply to the older party in a relationship as well as to the younger one. The older you get, the higher the standard to which you should be held responsible.

The lowest standard is whether the partner you’re targeting is sexually developed as an object. If her body is childlike, you’re seriously twisted. But if it’s womanly, and you’re too young to think straight, maybe we’ll cut you some slack.

The next standard is whether your target is intellectually developed as a subject. We’re not talking about her body anymore; we’re talking about her mind. When you were younger, we cut you slack for thinking only about boobs. But now we expect you to think about whether she’s old enough to judge the physical and emotional risks of messing around. The same standards apply, in reverse, if you’re a woman.

It’s possible that you’ll think about these things but fail to restrain yourself. If you’re emotionally immature, we’ll take that into consideration. But once you cross the third line, the age of self-regulatory competence, we’ll throw the book at you.

What do “cutting slack” and “throwing the book” mean? If you’re young, we could let your parents handle it. We could assign a social service agency to check up on you. We could require you to get counseling. We could issue a restraining order. We could put you on probation. We could put you in a juvenile facility, a mental institution, or jail. In the worst case, we could subject you to a mandatory minimum sentence.

Whatever the particulars, the measures taken should be developmentally appropriate. “Age-span” provisions, which currently allow for sex with somebody near your own age, are a good start, but they’re not objectively grounded. That’s why they differ wildly from state to state. I’d draw the object line at 12, the cognitive line at 16, and the self-regulatory line at 25. I’d lock up anyone who went after a 5-year-old. I’d come down hard on a 38-year-old who married a 15-year-old. And if I ran a college, I’d discipline professors for sleeping with freshmen. When you’re 35, “she’s legal” isn’t good enough.

What I wouldn’t do is slap a mandatory sentence on a 17-year-old, even if his nominal girlfriend were 12. I know the idea of sex at that age is hard to stomach. I wish our sexual, cognitive, and emotional maturation converged in a magic moment we could call the age of consent. But they don’t.