A claim that Dan Brown's blockbuster novel The Da Vinci Code breached the copyright in The Holy Blood And The Holy Grail was rejected by the High Court today.
Dan Brown welcomed the ruling, saying: "Today's verdict shows that this claim was utterly without merit. I'm still astonished that these two authors chose to file their suit at all."
Publishers Random House said the ruling "ensures that novelists remain free to draw in ideas and historical research".
"We never believed it should have come to court and frequently tried to explain why to the claimants," said Gail Rebuck, chief executive of Random House Ltd.
Mr Justice Peter Smith rejected a copyright-infringement claim by Michael Baigent and Richard Leigh, authors of The Holy Blood and the Holy Grail, who claimed that Dan Brown's blockbuster " appropriated the architecture" of their 1982 book.
The ruling will allow next month's release of the film based on the blockbluster, starring Tom Hanks.
The Da Vinci Code made Brown the highest-paid author in history.
The authors of the earlier work, Michael Baigent and Richard Leigh, sued Random House claiming the internationally-successful novel lifted material from their 1982 non-fiction book, itself a bestseller.
HBHG - courtroom code for Baigent and Leigh's book - deals with a theory that Jesus and Mary Magdalene married, had a child and the bloodline continues to this day, with a secret society protecting their heirs against wicked conspiracies enacted by the Church.
It is similar to the theme explored in the Dan Brown novel, also published by Random House, which won best book at last year's British Book Awards and has sold more than 40 million copies worldwide, earning the author £45 million in a year towards the total of more than £250 million since its publication in 2003.
Mr Brown, who was not present for the ruling, said in a statement: " This decision also touches on a wider issue. A novelist must be free to draw appropriately from historical works without fear that he'll be sued and forced to stand in a courtroom facing a series of allegations that call into question his very integrity as a person.
"I'm pleased with today's outcome, not only from a personal standpoint, but also as a novelist.
"Books are an important part of our culture, and this is a good day both for those who write and for those who enjoy reading."
He added: "I found the London High Court building to be a magnificent example of neo-Gothic architecture; I look forward to returning soon to view it from a vantage point other than the witness stand.
"After devoting so much time and energy to this case, I'm eager to get back to writing my new novel."
Baigent and Leigh said they spent five years researching their book and Dan Brown copied the central theme to avoid having to do his own research for his thriller version of HBHG.
But Mr Brown, who spent three days in the witness box during the three-week trial, said the accusations were "completely fanciful".
He said HBHG was just one of the works he and his wife, Blythe, had studied and he did not even know about their book when he gave his publishers a synopsis for DVC.
He told the judge: "For them to suggest, as I understand that they do, that I have 'hijacked and exploited' their work is simply untrue."
Gail Rebuck, chairman and chief executive of The Random House Group Limited, said: "We welcome today's judgment and at Random House we are pleased that justice - and common sense - have prevailed.
"It is highly unusual and very sad that these authors chose to sue their publishers, especially after 20 successful years.
"This case has been extremely distressing for all concerned. We never believed it should have come to court - and frequently tried to explain why to the claimants."
She added: "Copyright law tries to strike a fair balance between protecting the rights of authors and allowing literary freedom.
"Happily, today's judgment ensures that novelists remain free to draw on ideas and historical research.
"This is very important for the future of creative writing in the UK.
"Finally, I would like to thank Dan Brown for his patience and terrific support, and our legal team who have worked tirelessly on this case."
Jim Kennedy, spokesperson for Sony Pictures Entertainment, commented: "While we were not a party to this lawsuit, we are pleased by this result and as we've been saying all along we are proceeding with our plans for the release of the film on May 19."
Mr Justice Peter Smith said HBHG did not have a central theme as contended by the Baigent and Leigh.
"It was an artificial creation for the purposes of the litigation working back from the Da Vinci Code.
"Holy Blood Holy Grail has much more to it than the central themes as expressed so that the claimants' contention that HBHG has very little apart from the central themes is not correct.
"Even if the central themes were copied they are too general or of too low a level of abstraction to be capable of protection by copyright law."
He said these central themes were "merely a selective number of facts and ideas artificially taken out of HBHG for the purpose of the litigation".
There was no "architecture" or "structure" to be found in HBHG as contended by the Baigent and Leigh and Dan Brown had not infringed any such architecture or structure or substantially copied HBHG when he wrote DVC although it is clear it was used to write limited passages in the book, said the judge.
"Accordingly there is no copyright infringement either by textual copying or non textual copying of a substantial part of HBHG by means of copying the central themes."
But Mr Justice Peter Smith did say that the majority of the language copying claims were established. However, they were not claimed to be textual infringement of the copyright in HBHG and so did not help the claimants.Reuse content