LOS ANGELES — Agnes Nixon, the creative force behind the edgy and enduring TV soap operas “One Life to Live” and “All My Children,” has died. She was 93.

Nixon died Wednesday at a Haverford, Pennsylvania, physical rehabilitation facility close to her Rosemont home, said her son, Bob Nixon. She had checked in to gain strength for a planned book tour, he said.

She had just completed her memoir, “My Life to Live,” on Sunday, a week before it was due to publisher Penguin Random House for publication in early 2017, her son said.

“She was really a great wife, mother and human being — but above all, a writer. She was writing up until last night,” he said, and had called him with a few changes for the book.

The cause of death was not immediately known, he said.

Nixon suffered a stroke four years ago with serious complications, her son said, but she fought to regain her health. He confirmed her birthdate as December 1922, despite media reports that she was 88.

“I am devastated to learn that we have lost Agnes. I adored her and admired her and I am forever grateful to her!” Susan Lucci, who starred as Erica Kane on “All My Children,” said in a statement.

Nixon created, wrote and produced the long-running ABC daytime serials, which were canceled in 2011 as the network bowed to the reality that soaps had faded as a daytime TV force. (Both subsequently had short-lived online runs.)

“All My Children” aired for nearly 41 years, while “One Life to Live” made it to 44 years. They were set in the fictional Philadelphia-area towns of Pine Valley and Llanview.

Social issues including child abuse, AIDS, alcoholism and gay rights made their way into the series’ story lines. Erica Kane was the first regularly appearing TV character to undergo a legal abortion, in 1973.

In a 2003 episode of “All My Children,” Bianca, who was Erica’s daughter, and the character Lena shared what was billed as daytime TV’s first same-sex kiss.

“The theme of ‘All My Children’ from the beginning is the belief that, as God’s children, we are all bound to each other by our common humanity, despite our many personal differences,” Nixon told The Associated Press at the time. “The Bianca story is our latest effort to dramatize that belief.”

“Agnes’ impact on daytime television and pop culture is undeniable,” said Robert Iger, chairman and CEO of ABC parent The Walt Disney Co., in a statement. “She was the first to champion socially relevant topics, and the towns and characters Agnes brought to life leave an indelible imprint on television that will be remembered forever.”

Nixon, a native of Chicago, was mentored by the grande dame of the soap opera genre, Irna Phillips, back in the radio age.

She was writing for a TV soap, “Search for Tomorrow,” as early as 1951. In the late 1960s, while raising a family and serving as head writer for “The Guiding Light,” Nixon created a “bible” detailing “All My Children.”

The show was rejected by CBS, but after Nixon breathed new life into NBC’s flagging “Another World,” she was approached by ABC to create a new serial. That was the start of “One Life to Live,” which earned such solid ratings in its first year that ABC asked for another.

“I said to my husband, ‘I can’t think of another one,'” Nixon told the AP in 2013. “He said, ‘How about “All My Children”?’ So I opened the desk drawer and took out the ‘bible’ and sent it to ABC. They said, ‘Boy, that was fast work!'”

The stories and characters of Nixon’s fictional worlds never ended for her, Bob Nixon said: “It might not have been on the air but it was in her head.”

Agnes Nixon was married to the late Robert Nixon, and the couple’s four children are among her survivors. Services were planned for Saturday in Rosemont, with a private burial to follow.