The case of the Golden State Killer seemed solvable to Michelle McNamara. That’s what pulled her into it in 2010, when she started reading the message boards by fellow armchair detectives about the serial rapist and murderer, who’d claimed 60 victims throughout the state of California from 1976 to 1986. That’s what spurred her to spend the next six years pursuing the killer, eventually writing a feature story in 2013 for Los Angeles Magazine, “In the Footsteps of a Killer,” which she further developed into a book-length investigation, I’ll Be Gone in the Dark: One Woman’s Obsessive Search for the Golden State Killer, released by Harper this month.

McNamara’s fascination with the grisly began when she was just 14, when a young woman named Kathleen Lombardo, whom McNamara knew from church, was murdered while jogging a block and a half away from McNamara’s home in Oak Park, Illinois. The man who slit Lombardo’s throat was never found. McNamara would be forever haunted by what she’d later describe as “the specter of that question mark where the killer’s face should be.” The idea that this murderer could vanish into the night, that life could move on, even return to normal, for the grieving survivors after the young woman’s violent death deeply disturbed McNamara — and inspired her. In 2006, she started a blog, True Crime Diary, dedicated to discussing and revisiting unsolved cases. She saw in cold cases a personal challenge she couldn’t resist — the colder, the better. The Golden State Killer was the coldest case of all, and the one that exploded her fascination into a full-blown obsession.

From June 1976 until July 1979, a mysterious, sadistic 20-something white man in a ski mask was terrorizing cul-de-sac residents of quiet middle-class Sacramento County neighborhoods. He’d prey upon sleeping women who were often asleep with husbands or boyfriends, waking them by beaming a flashlight right into their eyes before tying up the couples and brutally raping his female victims. By all accounts, he wore a ski mask and little else, was of medium build, athletic, around five-nine, and spoke with his jaw clenched. The fearless attacker would sneak into victims’ single-story homes beforehand, get a sense of the place and the people he’d set his sights on, disable porch lights, unload bullets from guns, unlock windows, hide rope or shoelaces under cushions to use as ligatures — and often call victims before and after he’d assaulted them. “When you woke from a deep sleep to the blinding flashlight and ski-masked presence, he was always a stranger to you,” wrote McNamara, “but you were not to him.”

Initially known as the East Area Rapist (EAR), the man McNamara would rename the Golden State Killer sexually assaulted some 50 women across seven counties in Northern California. Then the attacks moved south, to Santa Barbara, Irvine, Ventura, and he added homicide to his gruesome repertoire — ten murders by McNamara’s count. At the time, law enforcement believed they were dealing with two different nightmares — in Southern California, he was known as the Original Night Stalker (ONS), and his reign of terror lasted until 1986, when he suddenly disappeared; he hasn’t been associated with a rape or murder since. Because DNA testing was in its early stages, and because the spree rapes and killings spanned many jurisdictions that didn’t always share information with one another, it would take 15 years for the connection to be made that these two offenders were indeed the same person — the story broke in 2001, whereupon he officially become known, quite unappealingly, as “EAR/ONS.” It would be another six years before an adult Michelle McNamara would discover — and dive headlong into — the case of this brazen criminal mastermind.

“I’ll be gone in the dark” are the chilling words the Golden State Killer uttered to one of his victims, and it became the title of McNamara’s book. But the case would not be solved. McNamara, who was the wife of comedian Patton Oswalt, suffered brutal bouts of insomnia, exacerbated by her research. She was not only trying to finish a book on deadline; she was trying to unmask a vicious offender who had eluded investigators for 40 years. Sarah Stanard, a childhood friend of McNamara’s who lives in L.A. and saw her regularly, says that in the week leading up to her death, McNamara confessed she hadn’t slept in days — she was exhausted: “She fell down a wormhole — she had a room full of bankers’ boxes of files she was going through. It wasn’t uncommon for her to not leave the house for days. And she told me she’d have a survivor or a victim’s family calling or emailing her every day. Above all, she wanted justice for them.” Another close friend, Kath Salvaty, who first met McNamara when they were freshmen at Notre Dame, tells me that when she saw McNamara two weeks before she passed away, she said, “I can’t believe I get paid to do what I do,” but then confided, “If I could do it over, I wouldn’t be solving it while I was writing it. Because I’m doing both and it’s really taking its toll.”

Oswalt admits, “Sometimes she didn’t handle the pressure well.” He grew increasingly worried about her. He told the New York Times that he’d implored her to take a night to “sleep until you wake up.” McNamara agreed, took Xanax, and went to bed. In the morning, Oswalt got their daughter dressed, made her lunch, and brought her to school, then returned to their Los Feliz home to the sounds of Michelle’s snores. He placed a cup of Michelle’s favorite coffee next to the bed; went into his office to make calls and write emails; then came back to their room and discovered the unimaginable: She wasn’t breathing. The paramedics pronounced her dead in the afternoon of April 21, 2016, a week after her 46th birthday. Her death was attributed to an undiagnosed heart condition that caused blockages in her arteries, as well as an accidental combination of the medications Adderall, Xanax, and Fentanyl. She left behind Oswalt; their daughter, Alice, now almost 9; five older siblings; 16 nieces and nephews; and a lot of friends. Including me.

I was supposed to be writing a different profile of my friend Michelle McNamara, an introduction to a brilliant new true-crime writer who, at 46, put her M.F.A. to excellent use and published our generation’s In Cold Blood. “This book was a really big deal for her,” recalls her sister Mary Rita McNamara Skrine. “It meant so much to her. I remember Patton pulled me aside and said, ‘She has no idea that her life is gonna change when it’s published. All these writers in that genre, she just stands out — beyond.’ ”

When McNamara was 7 years old, she loved to write fake ransom notes and leave them around her cul-de-sac block in historic Oak Park. Most neighbors recognized her bubbly handwriting and rightfully dismissed them as pranks. Oak Park was idyllic — a huge, liberal, racially and economically diverse Western Chicago suburb filled with Frank Lloyd Wright architecture and literary pride for its most celebrated resident, Ernest Hemingway, even though, according to lore, he’d despised it, having allegedly referred to it as a place of “broad lawns and narrow minds.” Oak Park felt safe — at least until August 1, 1984, the night 24-year-old Kathleen Lombardo was murdered in an alley near McNamara’s home, weeks before she and I would start our freshman year at Oak Park–River Forest High School.

Which is where I met Michelle, 32 years ago, during the first semester of our sophomore year: We were staff writers on the high-school newspaper, the Trapeze. When she joined the paper, she’d half-joked that she’d one day be the editor-in-chief. Except she wasn’t really joking — by senior year, she was on top of the masthead. I didn’t know what to make of Michelle when she arrived in the Trapeze’s office, but my first instinct was to be wary of her. I had never encountered a confident girl; I mistook it as arrogance. In retrospect, I should have been in awe her. I had a lot to learn from her — and I did throughout our 30-year friendship. But on the surface, back then, we were a study in contrasts. She was the youngest of six kids, with four sisters and a brother — the next-youngest, Mary Rita, was six years older than she. Her parents were West Side Irish, mine were Jewish and had mostly Jewish friends. Her father was a successful trial lawyer who briefly considered the priesthood while an undergrad at Notre Dame; her mother, as McNamara wrote, was fascinated with Hollywood and loved Judy Garland (the entertainer who died 12 days after her 47th birthday of a barbiturate overdose, a detail that stings now). My father, a second-generation Chicagoan, is an insurance salesman; my mother, born in Israel, is the daughter of Holocaust survivors, and that pretty much informs her worldview — as it did mine.

By the time she was born, McNamara would say, it felt like the party at her household was wrapping up — her oldest sibling was 14 years older — which gave her a lot of breathing room. As the eldest of two girls, I couldn’t find the party at our split-level home, or outside of it: I felt like Rapunzel with an asymmetrical bob, often grounded to my room by overprotective parents who were terrified I’d fall under the spell of sex and drugs. Michelle was beautiful, preppy, with pale skin and freckles, big, warm blue eyes, fingernails chewed down to a nub, her dark, shiny, straight hair worn shoulder-length — and a rewarding, judicious laugh. With stacks of notebooks filled with poems and short stories, she shared with me dreams of going to the Iowa Writers’ Workshop, and regularly published her work in our school’s literary magazine and earning accolades from the school’s annual Hemingway contest. She was sensitive and discreet and fiercely loyal to her friends — as her childhood friend Becky Thomason Humbert confirmed to me recently, “She did not love you unless she truly knew you — so you knew it was genuine. And it felt all the more meaningful.”

Just before finals week of our senior year, I experienced these virtues while hanging out in her attic-bedroom when I impulsively came out to her while recounting a story about a particularly humiliating incident involving one of our teachers. She immediately put me at ease, hugged me — and never betrayed my confidence.

After we graduated, Michelle attended her father’s alma mater. I went east to Rutgers, and we lost touch until our late 20s. She went to the University of Minnesota to get her M.F.A. in fiction. A professor there encouraged her to move to L.A. after graduation to write for TV and film. She took his advice and headed west in 1997.

A few years later, she went out alone to a club to see an old boyfriend perform and happened to catch the stand-up act of comedian Patton Oswalt, who confessed onstage, “Irish girls are my kryptonite.” Afterward, she touched his arm and said, “Irish girls — nice,” and walked away. Oswalt’s friend Greg Behrendt urged him to go after her. The two quickly discovered they were serious moviegoers and readers — with a particular passion for true crime — and after they married, in 2005, he urged her to focus her energy on cold cases. “I said, ‘Let’s build you a website. You have hours and hours to have to research and write about these cases — have a year where you can just work on this and figure out what it is,’ ” Oswalt tells me. “Of course, it turned into this whole career.”

“Michelle wasn’t interested in high-profile cases,” says Stanard. “And not because they were high-profile so much as they were just obvious — to her. Serial, Jon-Benet — people would ask her about them all the time. But she was like, ‘That’s not interesting, that guy fucking did it.’ ” The Golden State Killer was her ideal.

In 2010, she came upon a community of armchair sleuths on A&E’s Cold Case Files message board trying to crack the EAR/ONS case. Those connections led her to another writer who’d been working on the case: Paul Haynes, who became her research assistant, and whom she refers to in I’ll Be Gone in the Dark as “The Kid.” Before she knew it, she was in the thick of it, reading through 20,000 posts on an offender who terrorized 60 victims in the largest state in the nation for a decade, and inspired the change of the state law-enforcement’s DNA law (Proposition 69), and yet was nowhere near as famous as the Zodiac Killer.

Several months before she died, McNamara had a genuine reason to believe she’d found a breakthrough, or the path to one: In January 2016, she and Haynes went to the Orange County Sheriff’s Office to peruse archives and learned there was a room full of files that hadn’t been looked through in years — files that, she told Haynes, she was 80 percent certain held the name of the serial rapist-murderer. After so many years of obsessively hunting him, she had a much clearer sense of who the Golden State Killer was, or wasn’t. “Michelle wanted to leave with those files,” says Haynes. “Homicide detectives are notoriously tight-lipped, and Michelle hadn’t really spent much time connecting with [these detectives], so I wasn’t very optimistic. But Michelle was.” Within a few hours, they were loading up their SUVs with 40 boxes of files and evidentiary materials like victims’ belongings. “It’s astonishing we have that in our possession.” They packed up quickly, for fear that the undersheriff would have a change of heart.

If and when this case is finally solved, it will be in no small part because of McNamara, says criminalist Paul Holes from the Contra Costa Sheriff’s Office, who has worked on the case for 20 years and who regarded her as his investigative partner. Holes says she not only recognized new angles but was able to bring together people who weren’t able to be in contact with one another. “She had the freedom to call anyone she wanted — victims, witnesses, original investigators across various jurisdictions. Michelle talked to people that I hadn’t and found out details that weren’t written in the case files, and she would pass those on to me.” The files McNamara and Haynes got from Orange County, he says, were a tremendous breakthrough. “It’s like a gold mine.”

By the time of her death, McNamara had pored over about a quarter of those boxes. And so the book we have available to us is not the one she intended for us to see — and to those who knew her only as the private spouse of a public figure, Michelle McNamara emerges from these pages as much of a mystery as the Golden State Killer does, gone in the dark. The iteration of I’ll Be Gone in the Dark she leaves behind — finished chapters, drafts of chapters, detailed notes, transcripts with criminalists and detectives, all painstakingly collected by Oswalt and annotated by investigative journalist Billy Jensen and Haynes, with a foreword by Gillian Flynn and an afterword by Oswalt — is a breathtaking, ambitious, and exquisitely written work that comes to an abrupt halt, as if she herself had become an indirect casualty of the man she’d been chasing. McNamara, who would spend sleepless nights hunting down leads, recognized that it took a compulsive prowler to track one down. “We, who hunt him, suffer from the same affliction,” she wrote. “He peered through windows. I tap ‘return.’ Return. Return. Click Mouse click, mouse click … The hunt is the adrenaline rush, not the catch. He’s the fake shark in Jaws, barely seen so doubly feared.”

It’s been nearly two years since Michelle died, and the shock — her mere absence — is as present and stinging as the moment I learned the news. I still can’t sit on my Brooklyn stoop without reminiscing about the last time I sat there with her, in early October 2013. She arrived on a Saturday evening, the night of our 25th high-school reunion, armed with a bottle of Oban, our favorite single-malt Scotch, and what she’d jokingly refer to as “talking points” — an outline of discussion topics, ensuring that we didn’t miss anything. I cooked dinner for us, and I think we took all of two breaths in those five hours, eating and drinking and talking endlessly. She was excited and nervous — she’d just sold I’ll Be Gone in the Dark to Jennifer Barth at Harper. We discussed the daunting work ahead, and her widowed father, who was growing older fast. We gossiped about writers I knew and actors she knew, and about the reunion we were missing and not really so sad to miss, since we were spending the evening together.

On her way back to her hotel that night, she texted me to say that coming over was starting to feel like her “home away from home in NYC.” I sensed that it’d be awhile before I’d get to see her again — she had a lot of all-consuming work ahead of her. I shared her excitement — this was the book she was meant to write her whole life, the culmination of so many of her talents. I couldn’t wait to read it and to celebrate her.

Which is why her death felt unusually cruel. When I got the news, I scanned my phone to find our last communication. I needed to know what we’d said to each other. It was a text she’d written to me, in August 2015: “I miss you. I’ve been deeply MIA w this albatross of a book that is final [sic] finally due Dec 18 and then I will return to the living …” That promise crushes my heart now. But she didn’t break it, not exactly: I have in my hands the book that she’d been writing, her voice in these pages immortally suspended but so very much alive.