Image copyright Getty Images Image caption PD James created the elegant, intellectual detective Adam Dalgliesh

Crime novelist PD James, who penned more than 20 books, has died aged 94.

Her agent said she died "peacefully at her home in Oxford" on Thursday morning.

The author's books, many featuring sleuth Adam Dalgliesh, sold millions of books around the world, with various adaptations for television and film.

Her best known novels include The Children of Men, The Murder Room and Pride and Prejudice spin-off Death Comes to Pemberley.

The author told the BBC last year she was working on another detective story and it was "important to write one more".

"With old age, it becomes very difficult. It takes longer for the inspiration to come, but the thing about being a writer is that you need to write," she said.

"I hope I would know myself whether a book was worth publishing. I think while I am alive, I shall write. There will be a time to stop writing but that will probably be when I come to a stop, too."

In a statement, James's publishers Faber and Faber said: "This is a very sad day for us at Faber.

"It is difficult to express our profound sadness at losing PD James, one of the world's great writers and a Faber author since her first publication in 1962.

"She was so very remarkable in every aspect of her life, an inspiration and great friend to us all. It is a privilege to publish her extraordinary books. Working with her was always the best of times, full of joy. We will miss her hugely."

I am lucky to have written as many books as I have. It has been a joy. PD James Rex Features

Fellow authors paid tribute to James, including Ruth Rendell, who was a close friend and fellow life peer.

"She was wonderfully accurate in her police work; she really took great pains about it. She took great care and she got it right. She did not make mistakes, she saw to it that she didn't," she told BBC Radio 4's Front Row programme.

"She knew very well what she thought a perfect universe would be and she wanted her books to come close to that, to show what it should be.

"She held up people who were bad - who acted wrongly - as examples of the kind of people she didn't like and didn't want others to be affected by," Rendell told John Wilson on Thursday's show.

Ian Rankin who tweeted: "So sad about PD James. Every event I did with her was a joy. Sharp intellect, ready wit."

US crime writer Patricia Cornwell said: "RIP PD James and thanks for encouraging me when I was getting started."

Val McDermid said: "I salute the great PD James for so many reasons. Today, I've lost a friend as well as a teacher. There was nothing cosy about Phyllis."

Booker Prize winner AS Byatt told BBC News "the world will be a worse place without her".

"The writing was terribly good. When people in her books died, other characters' lives changed too. She was working with real people that she cared about.

"She said crime fiction should win the Booker and tried to have it taken seriously. Phyllis was on the borderline between crime fiction and literary fiction.

"She attended to detail and knew about chemistry and the nature of poisons and stabbings. She was always in control and always knew where she was going and what would happen."

Image copyright Rex Features Image caption Roy Marsden (centre) starred as detective Adam Dalgliesh in a series of PD James adaptations for ITV

Image caption Martin Shaw took over the Dalgliesh character on the BBC adaptations

Born Phyllis Dorothy James on 3 August 1920, the author did not publish her first novel, Cover Her Face, until she was 42.

It was a critical success, but she continued working for the Home Office - where she held a job in the forensic science department and then the criminal law department until 1979.

She gained international recognition in 1980 after the publication of her eighth book, Innocent Blood.

During the 1980s, many of James's Dalgliesh novels were adapted for television on ITV, starring Roy Marsden in the in lead role.

The BBC later adapted Death in Holy Orders and The Murder Room in 2003 and 2004 respectively, starring Martin Shaw as the detective.

James's 1992 dystopian novel The Children of Men was also given the big screen treatment in 2006 with a film directed by Alfonso Cuaron and starring Clive Owen and Julianne Moore.

The author was awarded the Crime Writers' Association's Diamond Dagger award in 1987 for lifetime achievement, and received the Medal of Honour for Literature in 2005 by National Arts Club.

She also served as a BBC governor from 1988 to 1993 and famously confronted former director general Mark Thompson in 2009 during an edition of BBC Radio 4's Today about the excessive pay packets given to some of its top executives.

She grilled him while serving as a guest editor of the show, telling him it was "really quite extraordinary" 37 BBC bosses earned more than the prime minister.

Thompson's successor Tony Hall paid tribute to the writer, calling her "a wonderful governor of the BBC, a brilliant author and a unique talent."

"Throughout her career she made a significant contribution to public service broadcasting, and just last Christmas millions enjoyed BBC One's adaptation of Death Comes to Pemberley," he added.

In 1991 she was created a Conservative life peer - Baroness James of Holland Park - in recognition of her role.