The Southern California city of Vernon, which is a short distance from downtown Los Angeles, spans an area of just 5 square miles, with a population of only a couple hundred people. Yet it was this tiny city’s decadeslong history of crime and corruption that fascinated middle-grade children’s author Lilliam Rivera and sparked the idea for her first book for an adult audience.

“I’ve had this book in mind since around 2016 when I had a stint working in Vernon as a copywriter,” said Rivera, who is based in L.A. and whose earlier books include “Barely Floating” and “Dealing in Dreams.” “I knew that I would write a book about that city, and that it would be a thriller.”

From its beginnings in 1905 as a drinking and gambling haven to its development into a company town, Vernon has served mostly as a home for agricultural and manufacturing businesses and their workers. Unexpectedly, the city is on the verge of a glow-up as the next trendy, L.A.-area hot spot in Rivera’s new thriller, “Tiny Threads,” out from Del Rey Books.

In it, marketing wunderkind Samara Martín is hired to help acclaimed designer Antonio Mota with his next major fashion show. Mota is one of the trendsetters remaking Vernon as he opens a branch of his fashion house in town. Samara, who is making her next big career move while escaping a bad family situation in New York, is excited to embrace her glitzy new life and throw herself fully into her work. And she is comforted by the small things that remind her of her beloved late grandmother, who was once a seamstress at a Vernon clothing factory.

However, the fashion environment is high-pressure and chaotic, and there’s a horrible smell emanating from the slaughterhouse still in operation next to the Mota offices. At night, Samara is unable to sleep because of the mysterious noises in her apartment. It might all be in her head — but it could also be the ghosts that Vernon’s new glamour can’t quite conceal.

In “Tiny Threads,” Rivera investigates the dark side of capitalism and its atrocities lurking in the past. This interview has been edited for length and clarity.

Q You’re mainly known for your children’s books and young adult literature, like “Never Look Back.” What was it like writing an adult book for the first time?

A So far, I’ve written children’s books — middle-grade books and graphic novels — but I always imagined that I would write a book that was more in the adult category. When I’m writing for children, I’m very aware of how important it is to not traumatize kids, you know? The story has to be a strong story, and because of that there might be some dark moments, but it can’t be overly traumatizing.

With “Tiny Threads,” all of that was out of the window. I didn’t really have to think about that. I could just fully write the horror of what is happening to someone who is falling into a dark place. It was very liberating to be able to write freely when it came to these dark moments.

Q What made you zero in on Vernon as the setting?

A Vernon is a really unique city that I feel a lot of people don’t know about — or if they do, they think it’s just a bunch of factories. The smell I describe in “Tiny Threads” is real — the office where I used to work in Vernon was right near a slaughterhouse, and it smelled like death. But at the same time, because of the clothes manufacturing, there were these sample sales that I would go stand in line for with everyone else. So in this one city, there was fashion and there were animals being killed. It was just a very strange, eerie place.

I’m originally from the South Bronx, and so I was familiar with how these kinds of communities are rebranded to make them sellable. I wanted to kind of reinvent Vernon and make it a hipster city that everyone wants to live in — but there’s always that dark history bubbling under the surface.

Vernon used to be promoted as an ideal city, somewhere people would want to live, with beautiful gardens and so on. But then it quickly became this corrupt place with violence and debauchery and drinking. One of my favorite little facts about Vernon is that it used to have the largest bar ever built, with hundreds of seats and a boxing ring outside.

Q In the acknowledgments, you said writing “Tiny Threads” was a way of grappling with the scary realities we’re all living in. Can you talk about that?

A I was deep into writing this book during the very beginning of the pandemic. Dealing with the horror of the pandemic — it’s something we all went through, but no one really talks about it like maybe we should be doing. And it led me to think about who gets to tell the history of a place.

Even though I was a journalist at the start of my career, I was always interested in looking at things and writing about them with a speculative turn. It was a way I could deal with terrible things happening — my way of controlling the narrative. It’s my way of coping, to control reality through a scary story.

Q For me, horror can definitely help work through feelings about how scary life can be — what about you?

A That’s what I love about watching scary movies. I don’t like the really gory ones, but I do like watching the same ones over and over again. There’s something about it that feels very soothing.

Since it’s 110 degrees in L.A., we’ve been watching John Carpenter’s “The Thing” with Kurt Russell, because it’s set in Antarctica. I’m so fascinated by all these people stuck in one place, trying to figure out who the enemy is and accusing each other — and in a way, it goes back to COVID for me. You know: Who gave me COVID? Who should I stay away from? Yeah, that’s the one movie that I’ve been watching over and over again.

Q A huge part of the book is about family, and how the history of a family ties in with the history of a place. Can you talk about that?

A So for Samara, the story begins with her grandmother passing away, and in going to Vernon, she’s kind of retracing her grandmother’s footsteps. Both she and her grandmother landed in Vernon with this hope of a new home — it’s such an immigrant story, right?

I used to work for a fashion house, and to me, the seamstresses were ... not witches exactly, but able to brew these magical creations, which never seemed to get the respect they deserved. I always felt like they were overlooked. I wanted Samara to feel that pull to find her grandmother in the seamstresses, but at the same time overlook the signs that she was in danger.

Q What do you want readers to take away from this book?

A I want them to be entertained, and maybe scared a little. I want them to know why I love fashion, and hopefully, I portrayed all the intricacy of design and creation so that they love it too. I want them to think about the communities in these towns — Vernon, Boyle Heights, the places east of L.A., and how corruption from the past might still affect people’s lives today.

I also wanted this story to be about the messiness of a young woman trying to find herself under capitalism, because what is the cost of making your job your life, or your identity? It’s such a trap.