In this interview released by her publisher, P.D. James discusses discovering Jane Austen as a child and crafting “Death Comes to Pemberley”--her sequel to Austen's “Pride and Prejudice.” (YouTube/Faber & Faber)

Special to The Washington Post

P.D. James, the British author whose cerebral murder mysteries brought a new level of sophistication to the genre and who created such enduring characters as the erudite but melancholy Scotland Yard sleuth Adam Dalgliesh and the resourceful private investigator Cordelia Gray, died Nov. 27 at her home in Oxford, England. She was 94.

Her publisher, Faber and Faber, announced her death. The cause was not disclosed.

Ms. James was 42 when she launched a literary career that would bring her critical acclaim, a life peerage and millions of fans worldwide. Her accomplishments were shadowed by tragedy: Her mother and then her husband suffered from mental disorders that left them at times institutionalized.

A civil service employee since her teens, Ms. James held a series of high-level jobs while caring for her family and harboring ambitions to write. She was the administrator of outpatient psychiatric clinics for the National Health Service in London and later an administrator in the police department’s forensic science section. Through those experiences, she gave her nearly 20 novels a convincing sense of police and forensic procedures.

Her books were brimming with vivid and gruesome details: ravaged corpses oozing rivulets of blood; a young nurse who unwittingly swallows bathroom disinfectant while volunteering for a demonstration before a class of her peers; a dead barrister with blood dripping over her white courtroom wig. Some of her books were infused with the suffering of chronic illness and prolonged dying.

“Let those who want pleasant murders read Agatha Christie,” Ms. James once said in a lecture. “Murder isn’t pleasant. It’s an ugly thing and a cruel thing, and murder in the isolated country house with the snow piled up outside just isn’t real.”

Her books’ adroit pacing and pervading aura of menace made her one of the finest, most absorbing craftsmen of the profession. She dispensed with many conventions of the British mystery trade: the genteel setting among teacups and vicars’ gardens, the breezy patter, and the quirkily eccentric amateur detective, such as Arthur Conan Doyle’s Sherlock Holmes and Dorothy L. Sayers’s Lord Peter Wimsey.

Ms. James’s work was grittier and more realistically prosaic at the same time.

“From the first I was aiming at credibility,” she told the Guardian newspaper. “I thought, amateurs don’t really have the resources to investigate a murder. I must have a professional. And I couldn’t have a woman because there were no women in the detective force then. I simply produced the kind of hero I’d like to read about: courageous but not foolhardy, compassionate but not sentimental.”

Indeed, Ms. James gave readers protagonists who were less than sympathetic — “frequently meanspirited, selfish, or simply victims of profound emotional exhaustion,” critic Martha Duffy wrote in Time magazine.

“She understands the lower and middle levels of bureaucracy, and she takes the nurses, supervisors, administrators and the people who fetch their tea and coffee seriously,” Duffy wrote. “She knows the regimen of a hospital as well as Jane Austen knew the rigid cycle of the Assembly Rooms at Bath.”

Phyllis Dorothy James was born Aug. 3, 1920, in Oxford and grew up in Cambridge, England. Her father was a tax official.

In 1941, she married Ernest Connor Bantry White, a medical student who served in World War II as a doctor attached to the Royal Army Medical Corps. They had two daughters in quick succession, and Ms. James often recounted escaping into literary worlds during her second pregnancy, exchanging London bomb shelters for the “sanity and peace” of Austen’s fiction.

Her husband returned from the war a broken man, and an undiagnosed mental disorder prompted his intermittent admission to psychiatric hospitals for the rest of his life. Government authorities refused to accept that his condition was the result of the war, so he received no pension. Ms. James was forced to work to support her family and retired from the British Home Office in 1979.

She cared for her husband until his death in 1964, at 44, from what she said was a toxic combination of alcohol and drugs. She said it was likely a suicide. She seldom talked about her marriage, but she wore her wedding ring for the rest of her life.

Survivors include two daughters.

With her ambition to write deferred by caring for her ill husband, Ms. James decided as she neared 40 that she “didn’t want to end up saying to my children and grandchildren, ‘Well, I always thought I’d be a writer,’ ” she told the Toronto Globe and Mail.

Her first book, “Cover Her Face,” published in 1962, hinges on the death of a young maid caring for a wealthy invalid at an Essex country estate. The young woman, a single mother, had been drugged and strangled, and Scotland Yard was called in. The book introduced her signature character, chief inspector Dalgliesh, a man of chillingly dedicated intellect whose own sergeant described him as “pretty brutal.”

Dalgliesh, named after one of Ms. James’s favorite teachers, is a published poet, a solitary man whose wife and child died years before, leaving him emotionally wounded. Ms. James once said his outer reserve was set off by his “compassion toward the weak.”

“I gave him all the qualities that I personally admired,” the author told the Contra Costa Times in 2001. “I thought if I got fed up or bored with this man, the readers would too. I didn’t want to be involved in his love life, so I callously killed off his wife and child.”

“Cover Her Face” was followed in 1963 by “A Mind to Murder,” in which Dalgliesh is summoned from a literary dinner to investigate the stabbing death of an employee at a psychiatric clinic. “Shroud for a Nightingale” (1971) returns to a medical theme, with Dalgliesh investigating the deaths of two student nurses at a hospital nursing school called Nightingale House.

More Dalgliesh novels followed, but Ms. James also wrote two mysteries featuring the character of Cordelia Gray. Introduced in 1972’s “An Unsuitable Job for a Woman,” 22-year-old Gray inherits a ramshackle detective agency from her partner and immediately sets to work investigating an apparent hanging suicide.

Later in her career, Ms. James took an innovative turn toward science fiction with “The Children of Men” (1992), which was made into a film in 2006 starring Julianne Moore and Clive Owen. Several of the Dalgliesh novels have also been made for television.

In 1980, Ms. James published “Innocent Blood,” which brought the author wider recognition as a writer of serious fiction. The book’s plot centers on an aspiring novelist who discovers that she was adopted and that her birth mother is about to be released from prison after being convicted of murdering a schoolgirl.

Among many other honors, Ms. James was given a life peerage in 1991 as Baroness James of Holland Park (her London neighborhood). She wrote a memoir, “Time to Be in Earnest” (2000).

She paid off a long-standing literary debt by writing a sequel to Austen’s “Pride and Prejudice” in “Death Comes to Pemberley” (2011), in which the peaceful married life of Elizabeth Bennett and Mr. Darcy is interrupted by a murder plot.

Ms. James was a practicing Anglican who featured the Church of England in many of her novels, including “Death in Holy Orders” (2001). In a 1980 interview with The Washington Post, she explained her affection for detective fiction in charged moral tones, noting, “They’re based on the fundamental belief that life is sacred and murder is unique and uncommon. . . . In a sense, detective novels are like 20th-century morality plays; the values are basic and unambiguous.”