In Michael Connelly’s new crime thriller, “The Waiting,” Los Angeles police Detective Renée Ballard’s team takes on the decadesold case of the Pillowcase Rapist after a random DNA hit delivers a fresh clue.

When her badge and gun are stolen from her car while she’s surfing at Staircase Beach in Malibu early one morning, she turns for help to her friend, retired LAPD homicide Detective Harry Bosch, the longest-running protagonist in the Michael Connelly universe, and together they find themselves investigating a domestic terrorism plot.

In time, Bosch’s daughter Maddie, now an LAPD officer, finds her way into the story, and onto the cold-case unit, too.

Oh, and then there’s the Black Dahlia, the nickname given to the victim in the most notorious unsolved murder case in the history of Los Angeles, who in Connelly’s 39th crime novel finally enters the picture.

“It’s funny. Black Dahlia’s like the last thing I thought of but I’ll tell you why,” Connelly says on a recent call. “It started with the idea that I wanted Harry’s daughter Maddie — you know, she’s a young person — and I wanted to make it somehow believable that she could get onto the cold-case squad, either temporarily or not.”

Like everybody, but especially writers in the crime genre, Connelly knew plenty about the macabre murder of Elizabeth Short, the so-called Black Dahlia, in January 1947. Writer James Ellroy broke into the mainstream with his 1987 novel “The Black Dahlia.” When retired LAPD homicide Detective Steve Hodel in 2003 published “Black Dahlia Avenger,” a true-crime book in which he argued his late father was the killer, Connelly provided a blurb for the book.

“I had a ready-made source,” Connelly says of his access to detailed Black Dahlia lore. “Ballard is based on Mitzi Roberts, who ran the LAPD cold-case unit for about 20 years. The Black Dahlia was her case, meaning that when calls come in, and she said they came in every week with theories and possibilities and all that stuff, they all went to her.

“It’s an unsolvable case, but it’s an open case so she would dutifully handle all these inquiries,” he says of Roberts, who retired this year. “She was kind of like the caretaker of that case. So she told me about what’s there, what is gone over the years, and the intrigue that still surrounds that case.”

When Maddie Bosch stumbles onto fresh evidence about the case, Connelly not only found her path into Ballard’s team, but into his own take on the infamous murder.

“I wanted to keep the lure of the case alive,” he says. “So in a way it’s solved, but unsolved. I’m not the first to try to do this. James Ellroy did and so forth.

“But I just thought, ‘Hey, I write about L.A. in novels now for 30 years. I should at least say something about this most notorious case.’ ”

In an interview edited for length and clarity, Connelly talked about why he’s no creative genius (agree to disagree), how real cases inspire his fictional ones, the status of TV series including “Bosch: Legacy” and “The Lincoln Lawyer,” a new series with Renee Ballard, and more.

Q Tell me about the original inspiration for the storylines here — like the Pillowcase Rapist.

A The starting point was, god, I hate to say this, but almost 40 years ago when I was a crime reporter in South Florida. I cover this case called the Pillowcase Rapist who attacked like 44 women in a two-year period. And then the guy totally disappeared.

Then, just in, I think, the last five years, some young person was arrested on a felony in Florida, and you’re required to give a swab. So his DNA went through (the system) and came back that he is related to the long-disappeared but sought Pillowcase Rapist. They basically tracked this kid to his father, and his father was arrested and convicted of the crime.

Q How about the gang of thieves ripping off surfers like Ballard?

A I have a friend who’s a surfer and he got ripped off while he was surfing. I guess what I’m revealing here is I’m not a creative genius. I take true stories and figure out how to use them. And they tied this rash of surfer rip-offs to an app (that identified the day’s best surfing conditions).

I thought it was kind of ingenious from a criminal standpoint. An app that gives you a place to find victims because they’re out there on the water. Most of them don’t have keys on them so they hide them in wheel wells and things like that.

So those are the two real crimes that came across my radar. I don’t outline my books, so it didn’t really start this way. But I wanted — it’s not a spoiler because it happens in the first chapter — when Ballard gets her badge ripped off to be a smallcrime that led to something big. So that’s where the domestic terrorism came in.

Q The book jacket calls it a Ballard and Bosch novel, but it’s really a Ballard and Bosch and Bosch book. Is this Maddie’s biggest role in your work?

A Yeah, definitely. She’s actually a bigger role in the TV show. I’ve been trying to write about her in a bigger way for a long time, but I’m trying to be realistic, so she needed seasoning. I probably started writing about Ballard five or six years ago because Maddie wasn’t ready yet. But now I think she’s getting ready, and that was part of my thinking.

Q Is Maddie someone you see as a potential lead character in a book?

A Who knows if I get to do that? You know, I’m 68 now. But there is like a passing of the baton to her in this. I mean, I love Ballard and I will continue to write Ballard. I definitely see a book where those two are like partners and my co-leads. But it all depends on where inspiration comes.

I wouldn’t hesitate to write about Maddie Bosch by herself, I should say. Just to me, I’m sending up opportunities to see where inspiration takes me.

Q A supporting character I really liked here is Colleen Hatteras, the genealogy expert on Ballard’s all-volunteer cold-case team. The “citizen sleuth” has become a trend over the last decade. Tell me about including her.

A I mean, that is in vogue in law enforcement and investigation. I don’t know of any police department in the country that is under budget. They’re all stressed to provide services, and so more and more you seeing them leaning on these volunteers. Ballard being the only sworn officer in that group of volunteers, that’s based on fact. That’s LAPD’s cold-case unit at the moment.

What these people are doing, the volunteerism, it’s pretty fantastic. But I think in general, the media, it’s almost been like a romantic acceptance of this. You know, they’re going after killers. We can’t forget there’s danger involved, and I did want to explore that with Hatteras.

Q Let’s jump to some of the TV things. “Bosch: Legacy” will end after the new season in 2025? But the Ballard show will start next year, and Harry will show up in that series every now and then?

A Yeah, we’re filming that (untitled Ballard show) now. It’s going really well. Maggie Q is Ballard and she’s fantastic. I don’t know the final count, but, let’s see, we’re on Episode 6 or 7 and Bosch has been in three different episodes. I’m not as involved in that show as I was in “Bosch,” but my guess is that he’ll probably be back in the 10th episode. And other familiar faces from the “Bosch” show will show up.

Q There was going to be a spinoff with Jerry Edgar, Bosch’s LAPD partner, but now that’s maybe not happening?

A Pretty much. I mean, it could happen, but Amazon were kind of developing Ballard and Edgar side by side. It was always going to be a race to who got the scripts finished first, in a way, and so Ballard kind of won that race. So that puts Edgar kind of on a back shelf.

I wouldn’t say it’s 100% dead, but Ballard won’t be out until probably fall of next year, and I think they’ll wait and see how that does because they would add to the MCU, as you call it. I can’t say that, really, because I’ll get sued.

Q You can call it the MCTU — the Michael Connelly Television Universe. So “The Lincoln Lawyer” and Mickey Haller are back on Netflix for the third season this month. That feels like it’s popular enough to keep going to a fourth season.

A Their plan or structure is always to see what the numbers are. So we’re anticipating we’ll get the go-ahead on the fourth season within a month of this coming out. It’s a really good season. It’s based on my favorite Lincoln Lawyer book, “The Gods of Guilt,” and they did a great job with it. And Netflix did commission the writing room for the fourth season, so actually have a fourth season written and we’re just waiting on the go-ahead.

Q So now Harry is showing up on Ballard’s show, and he and Mickey Haller have teamed up in books together. Is that something that could happen on the TV series? Bosch popping up in “The Lincoln Lawyer”?

A Netflix (which has “The Lincoln Lawyer”) and Amazon (which has Bosch and Ballard), they don’t play in the same sandbox. It’s very unlikely that will happen. Although there was a cool thing last summer when both these seasons (of “Bosch: Legacy” and “The Lincoln Lawyer”) were being filmed.

One day we were filming like two blocks apart. We were shooting “Bosch” in the plaza right in front of City Hall, and “Lincoln Lawyer” was filming in a restaurant a block away. We, the “Bosch” people, walked over to the “Lincoln Lawyer” team.

So what will never happen on the screen happened in real life, where Titus Welliver (who plays Bosch) and Manuel Garcia-Rulfo (who plays Haller) met each other. It was kind of a fun moment.