LONDON — British crime writer P.D. James, creator of poetry-writing detective Adam Dalgliesh, has died at the age of 94, her publishers said Thursday.

“We will all miss her,” Charles Elliott, her editor at Knopf, said in a statement. “Her books were in a class of their own, consistently entertaining yet as well-written and serious as any fiction of our time.”

“Saddened to hear of the death of P.D. James, one of the UK’s greatest crime writers, who thrilled and inspired generations of readers,” Prime Minister David Cameron tweeted.

Phyllis Dorothy James, created Baroness James of Holland Park in 1991, was the author of 20 books, most of which have been filmed and broadcast on television in Britain and the United States.

Among her best-known titles are “The Murder Room,” “The Lighthouse,” “The Children of Men” and most recently “Death Comes to Pemberley.”

She was born in Oxford in 1920, the daughter of a civil servant and herself worked in various government departments including in the forensic science department of the Home Office (interior ministry).

She said on her website she had known from early childhood she wanted to be a novelist and that she turned to crime because she had been fascinated by the construction that “whodunnit” books required.

“After I had progressed in my craft I came to believe that it is possible to write within the conventions of a classical detective story and still be regarded as a serious novelist and say something true about men and women and the society in which they live,” she added.

Her hero, the suave police detective Dalgliesh, had not been based on anyone she knew, she said, but represented the qualities she most admired in a man: sensitivity, courage and intelligence.

He appeared in her first book, “Cover her Face,” published when she was 42 in 1962 and in 13 more, with the last, “The Private Patient,” appearing in 2008.

She was the creator too of female private detective Cordelia Grey who appeared in “An Unsuitable Job for a Woman” and “The Skull beneath the Skin.”

James was also a magistrate and served as a governor of the BBC. She was awarded the Crime Writers’ Association’s Diamond Dagger award in 1987 for lifetime achievement and received the Medal of Honor for Literature in 2005 by National Arts Club.