P.D. James took the classic British detective story into tough modern terrain, complete with troubled relationships and brutal violence, and never accepted that crime writing was second-class literature.
James, who has died aged 94, is best known as the creator of sensitive Scotland Yard sleuth Adam Dalgliesh. But her wickedly acute imagination ranged widely, inserting a murder into the mannered world of Jane Austen in "Death Comes to Pemberley" and creating a bleak dystopian future in "The Children of Men."
James told the Associated Press in 2006 that she was drawn to mystery novels because they "tell us more ... about the social mores about the time in which they were written than the more prestigious literature."
Publisher Faber and Faber said James died peacefully on Thursday at her home in Oxford, southern England.
Faber, James' publisher for more than 50 years, said in a statement that she had been "so very remarkable in every aspect of her life, an inspiration and great friend to us all."
James' books sold millions of copies around the world, and most were just as popular when adapted for television.
Because of the quality and careful structure of her writing — and her elegant, intellectual detective Dalgliesh — she was at first seen as a natural successor to writers like Dorothy L. Sayers, creator of Lord Peter Wimsey, in the between-the-wars "Golden Age" of the mystery novel.
But James' books were strong on character, avoided stereotype and touched on distinctly modern problems including drugs, child abuse, terrorism and nuclear contamination.
Novelist A.S Byatt said the realism of James' writing was one of its strengths.
"When people in her books died the other characters' lives changed as they would in real life," Byatt told the BBC. "Phyllis (James) was working with real people that she cared about.
"The world will be a worse place without her."
Although there was nothing remotely genteel about P.D. James' writing, she was criticized by some younger writers of gritty urban crime novels.
They accused her of snobbery because she liked to write about middle-class murderers, preferably intelligent and well-educated, who agonize over right and wrong and spend time planning and justifying their crimes. Dalgliesh of Scotland Yard, hero of more than a dozen of James' 20 novels, is a decidedly gentlemanly detective, who writes poetry, loves jazz and drives a Jaguar.
James was unapologetic. She said her interest was in what made people tick.
"The greatest mystery of all is the human heart," she said in a 1997 interview, "and that is the mystery with which all good novelists, I think, are concerned. I'm always interested in what makes people the sort of people they are."
Phyllis Dorothy James was born in Oxford on Aug. 3, 1920. Her father was a tax collector and there was not enough money for her to go to college, a fact she always regretted.
Even as a child, she said, she had been interested in death. As a little girl, when someone read "Humpty Dumpty" to her, she asked, "Did he fall or was he pushed?"
But she did not start producing her mysteries until she was nearly 40, and then wrote only early in the morning before going to the civil service job with which she supported her family. Her husband, Connor Bantry White, had returned from World War II mentally broken and remained so until his death in 1964.
"It was a late beginning for someone who knew from early childhood that she wanted to be a novelist, and, looking back, I can't help regret what I now see as some wasted years," James wrote in a 1999 autobiography, "Time to Be Earnest."
James worked as a filing clerk, hospital administrator and in the forensics and criminal justice departments of Britain's Home Office.
Her first novel, "Cover Her Face," was published in 1962 and was an immediate critical success, but she continued to work as a civil servant until 1979.
In 1980, with the publication of her eighth book, "Innocent Blood," her small but loyal following exploded into mass international popularity.
"Monday, I was ticking along as usual, and by Friday I was a millionaire," she once said.
The Crime Writers' Association gave James its Diamond Dagger award in 1987 for lifetime achievement, and in 2005 the National Arts Club honored her with its Medal of Honor for Literature.
As well as Dalgliesh, James created the female detective Cordelia Gray, protagonist of "An Unsuitable Job for a Woman" and "The Skull Beneath the Skin."
Her work was not confined to the mystery genre. Her 1992 science fiction novel "The Children of Men," about a dystopian future in which humanity has become infertile, was turned into a critically praised 2006 movie by Alfonso Cuaron.
In 2013 she published "Death Comes to Pemberley," introducing a murder mystery into the world of Jane Austen's "Pride and Prejudice."
Queen Elizabeth II made her Baroness James of Holland Park in 1991, in recognition of her work as a governor of the BBC, a position she held from 1988 to 1993.
James represented the Conservative Party in the House of Lords, but in many ways she was anything but conservative.
"Doyle and Christie are genre writers — clever, yes, but one must suspend considerable disbelief right from the get-go when reading their works," said author Anita Shreve. "No such acrobatics are necessary with a James novel."
James is survived by two daughters and several grandchildren and great-grandchildren.