On April 24, 1967, Viking Press published a new novel by a 17-year-old girl. S.E. Hinton’s The Outsiders, about teen class warfare, would go on to become a massive bestseller; it would also help to create the publishing category of young adult fiction as we know it today, with its breathless, intimate immediacy.

On June 26, 1997, in the UK, Bloomsbury published a new novel by a young single mother. J.K. Rowling’s Harry Potter and the Philosopher’s Stone kicked off the adventures of a boy wizard and his best friends as they fight the forces of darkness; it and the six Harry Potter books that followed would go on to become an international phenomenon, and they would help make children’s literature one of the biggest money-makers in publishing.

This year, we’re celebrating the 50th anniversary of the book that helped to invent YA as we know it, and the 20th anniversary of the book that helped to make YA an unstoppable force. But where The Outsiders made YA profitable by creating a world exclusively for and about teenagers, Harry Potter made YA even more profitable by creating a world in which YA is for everyone.

Here’s how they did it.

The Outsiders is widely celebrated as one of the first truly authentic teen novels

The Outsiders is a very, very adolescent book. S.E. Hinton was 14 when she started writing it and 17 when she finished, and it shows: The entire story reads, endearingly, like a 14-year-old trying to be deep. It’s about the endless, mythic war between the Greasers (the poor kids) and the Socs (the preppy rich kids). The whole thing is told from the point of view of a tragic, noble Greaser named Ponyboy, who loves quoting poetry and watching sunsets almost as much as he loves describing how beautiful his friends’ eyes are in great detail.

But initially, The Outsiders was marketed to adults, and it flopped. “The Outsiders died on the vine being sold as a drugstore paperback,” Hinton recalled in 2014. It wasn’t until a few years later, when publishers saw that the vast majority of the book’s sales were coming from school libraries, that the book found its true market: teenagers.

Other books for teenagers existed at the time, but they tended toward the light and the didactic. Hinton describes them dismissively: “Mary Jane wants to go to the prom with the football hero and ends up with the boy next door and has a good time anyway.” But The Outsiders was about social warfare. It had drugs and alcohol and gang rumbles. And it was told in intimate, confessional first-person that made Ponyboy feel as though he were there in the reader’s head, whispering all his secrets.

In 2017, The Outsiders might feel affected and a little precious, but in 1967, it felt shockingly authentic: a novel by a real teenager, about the things real teenagers care about. After its publishers marketed it to real teenagers, it became one of the bestselling YA novels of all time.

Teenage readers primed by The Outsiders wanted to read voices that sounded like their own; they wanted to read about problems that felt authentic and gritty. To fill the demand, a new kind of book emerged, characterized by a conversational first-person voice and a determination to face the problems of adolescence head-on. Some of The Outsiders’ immediate successors are classics in their own right (1975’s Forever …) and some are embarrassingly dated (1971’s Go Ask Alice), but all of them helped establish expectations for the YA tradition that continues today with books like The Hate U Give.

The Outsiders helped give birth to contemporary YA as a publishing category. Thirty years later, Harry Potter would emerge, and everything would change once again.

Harry Potter is not technically YA, but that doesn’t mean it didn’t change the way YA is made and marketed

Harry Potter and the Sorcerer’s/Philosopher’s Stone is not a YA novel. It’s middle-grade, meaning it’s for children between the ages of 8 and 12.

Part of this distinction comes from Harry’s age — he’s 11 for most of that first book —and part of it comes from the book’s themes; it’s concerned with childhood and safety and coziness rather than adolescence and independence. But a lot of it lies in the book’s voice.

Like many middle-grade novels, the earlier Harry Potter books are written with a little more distance in their voice than most YA fiction: You get the sense of a wise and benevolent adult narrator telling a child reader about another child, not of one teenager talking directly to another. That would change later on — book five, Order of the Phoenix, which fairly wallows in Harry’s angst-ridden interiority, very much has a YA voice — but at the beginning, Harry Potter was traveling in the same circles as the Narnia series or Roald Dahl’s Matilda.

To the general public, however, that distinction hardly mattered. All that the general public knew was that Harry Potter was a book for children, and that adults were devouring it, at first with their children, and then on their own. The books offered a fully realized magical world that any reader, child or adult, could enjoy visiting. For adult readers in particular, Harry Potter was like candy: compulsively consumable, and nostalgically reminiscent of childhood. And it was concerned enough with deeper questions — morality, mortality, depression, fascism — that an adult reader could read it without feeling too dumb.

As Harry Potter became an unexpected crossover success, middle-grade and YA novels became conflated in the cultural conversation. A voracious appetite arose for books aimed at children that adults would enjoy too, and that appetite quickly shorthanded itself into “books for teens.” So to most people, YA came to mean books for kids that aren’t picture books. The fun ones. You know, YA.

And so, on the back of the Harry Potter craze, came a new YA boom. “When I started,” one bookseller told the Globe and Mail in 2011, “Kids was a relatively small percentage of the business and the teen category within that was my second-smallest category. Today it's the second-largest category in the store. Fiction is one and teen is two."

Bookstores expanded their YA sections; publishers began investing more money in their YA and children’s lists. Blogs like Forever Young Adult popped up to help adults follow YA literature. Film studios leapt on the movie rights to YA properties that might become the next Harry Potter, and so came Twilight and The Hunger Games and Divergent and A Fault in Our Stars.

In the late ‘60s and early ‘70s, the YA market that The Outsiders helped to create built its brand as something fully distinct from the adult market. The Outsiders flopped when Viking tried to sell it to grown-ups, but it sold like hotcakes when teens got their hands on it, because teens understood The Outsiders and The Outsiders understood teens. Part of what made the YA of the era profitable was that it was Not Adult: It was explicitly and ontologically not for the grownups, but for the teens.

Harry Potter reversed all that. It was a global sensation that everyone had to read, even adults, and it created a marketplace in which YA was profitable in part because adults were willing to read it, too. Contemporary YA is a launching point for major franchises because, in a post- Harry Potter world, it is taken for granted that YA is universal.

It took 30 years to get from The Outsiders to Harry Potter, and today marks Harry Potter’s 20th anniversary. So it’s possible we’re only 10 years away from the next seminal YA/middle-grade property that changes the way an entire industry thinks and operates. It might collapse the YA/middle-grade distinction completely, or it might finally allow New Adult — which literally targets “new” adults, from ages 18 to 30 — to take off as a category in the way it has mostly failed to do.

Whatever it is, it’s likely to change the industry in utterly unexpected and unlooked-for ways, and I’m looking forward to reading it. Aren’t you?