US author Dan Brown's publisher Random House has won its court battle in London over accusations of plagiarism.
Dan Brown's book is being made into a Hollywood film
The best-selling writer's reputation had been called into question by claims that he lifted parts of another book for the central idea of his thriller The Da Vinci Code.
With a $100m (£57m) movie starring Tom Hanks due to be released next month, Mr Brown would have been publicly humiliated by a defeat.
Mr Brown, whose 2003 novel has sold more than 40 million copies worldwide, was defendant Random House's star witness.
He appeared in the witness box at the High Court in London in March to support his UK publisher's defence that the case carried no merit.
Michael Baigent and co-author Richard Leigh had claimed that The Da Vinci Code contained ideas taken from their 1982 non-fiction book The Holy Blood and the Holy Grail.
They alleged that Mr Brown had "appropriated the architecture" of their book for his novel, which they said "relied heavily" on their work.
The pair's main claim was that Mr Brown had lifted their idea that Jesus married Mary Magdalene, the couple had a child and his bloodline survived until the modern day.
New Zealand author Michael Baigent was one of the co-claimants
Giving evidence, Mr Brown said it was "simply untrue" for the authors to claim he had "hijacked and exploited their work", as they were only two of the writers to cover the subject.
"Yet I went out of my way to mention them for being the ones who brought the theory to mainstream attention," he said.
"I would like to restate that I remain astounded by the claimants' choice to file this plagiarism suit."
Mr Brown told the court his wife Blythe carried out much of the research and she "was deeply passionate about the sacred feminine".
He said it was hard to pinpoint the sources he and his wife used while researching The Da Vinci Code as they had carried out wide investigations of "the historical underpinnings of the novel".
Richard Leigh also brought the action, which began in 2004
Mr Brown admitted to using The Holy Blood and the Holy Grail while writing his book but only as one of several sources.
"I have never been shy about saying Holy Blood, Holy Grail is part of this," he told the court.
He pointed to the fact that Leigh Teabing, a character in the novel, is an anagram of the names of the two claimants in the case, and their book is directly referred to in the narrative.
The defence's case was helped by concessions by the plaintiffs.
Under questioning, claimant Mr Baigent had admitted he exaggerated his case in an interview with a journalist but said there were "fairly specific" similarities to his non-fiction book.
He had to concede in court, however, that the themes of Mr Brown's best-seller were not made in the same order as their publication.
Co-claimant Mr Leigh also had to concede that the pair's book, a bestseller in its day, had "repeated" ideas put forward in previous books.
Even the pair's former agent Patrick Janson-Smith said in court that he thought their case had been "a storm in a teacup".
"I didn't think Baigent and Leigh had a leg to stand on," he said.
Random House published both books at the centre of the dispute
Summing up his clients' case, Jonathan Rayner James QC had claimed Mr Brown had been "unco-operative" and his evidence should be viewed with "deep suspicion".
Mr Rayner also questioned the decision not to bring Mr Brown's wife to court to give evidence about the timing of the research, which he called "crucial" to the case.
"Perhaps that explains why she was not produced," he said.
But defence's lawyer John Baldwin QC, summing up, said the ideas were "too general" to be protected by copyright.
He said: "Many of the ideas complained of were not original to The Holy Blood and the Holy Grail. They were merely copied from others."
Mr Baldwin said: "The claimants were doing themselves exactly what they complain of in Mr Brown."