Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

LOS ANGELES — Sue Grafton, author of the best-selling "alphabet series" of mystery novels, has died in Santa Barbara. She was 77.

Grafton was surrounded by family, including husband Steven Humphrey, when she died Thursday after a two-year battle with cancer, her daughter, Jamie Clark, posted on the author's website.

"Although we knew this was coming, it was unexpected and fast. She had been fine up until just a few days ago, and then things moved quickly," the posting said.

Mystery writer Sue Grafton poses for a portrait in New York on Oct. 15, 2002. Gino Domenico / AP

Grafton began her "alphabet series" in 1982 with "A is for Alibi." Her most recent book, "Y is for Yesterday," was published in August.

"Many of you also know that she was adamant that her books would never be turned into movies or TV shows, and in that same vein, she would never allow a ghost writer to write in her name," her daughter wrote. "Because of all of those things, and out of the deep abiding love and respect for our dear sweet Sue, as far as we in the family are concerned, the alphabet now ends at Y."

Humphrey said Grafton had been struggling to find an idea for "Z'' while undergoing treatment and losing weight.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"Nothing's been written," he told The Associated Press in a telephone interview. "There is no Z."

He added with a laugh, "Nobody in this family will ever use the letter Z again."

The fictional heroine of the series, Southern California private detective Kinsey Millhone, was Grafton's alter ego, she told The Seattle Times earlier this year.

"I'm an introvert, so doing half of what Kinsey is beyond my poor capabilities," Grafton said. "But it's fun to get to live her life without penalty."

Her husband agreed that Grafton was Kinsey.

"Yes, as Sue said, 'We're one spirit in two bodies, and she got the good one,'" Humphrey said.

We're devastated by the loss of Sue Grafton. There are no words. pic.twitter.com/bwUZowW4qa — Penguin Random House (@penguinrandom) December 29, 2017

While Grafton aged, her heroine didn't quite as much.

"So when I started, she was 32, and I was 42. Now, she is 39, and I am 77. So there's a little bit of injustice there, but she is single," she told NPR in an interview earlier this year. "She's been married twice. She has no kids, no pets, no house plants."

She said she was looking forward to reaching the end of the alphabet with "Z is for Zero."

Grafton began writing at 18, and wrote her first novel at 22. "A is for Alibi" was the eighth novel she wrote, and the third she had published.

Born in Louisville, Kentucky, Grafton stayed tied to her roots, dividing her time between a home there and her home in California. In addition to her husband and daughter Jamie Clark, she is survived by another daughter, Leslie Twine, and her son, Jay Schmidt.

Grafton's remains will be cremated and the family will hold a private memorial Sunday. Memorials also will be held in Louisville and New York City.