Two authors who claimed their work was plagiarised to produce The Da Vinci Code are facing financial ruin after losing a court appeal.

Michael Baigent, 57, and 62-year-old Richard Leigh had accused novelist Dan Brown of lifting the main idea for his best-selling novel from their book.

Michael Balgent and Richard Leigh face 'ruin' after their appeal was dismissed

But the Court of Appeal backed the High Court's decision to throw out their claim for damages for infringement of copyright, leaving them with a £3million legal bill.

Sources said both Mr Baigent and Mr Leigh were "seriously ill" as a result of the stress brought on by their battle.

Mr Baigent, a New Zealander, told the Daily Mail: "The stress of the last two years has been burning away inside me. I ended up being hospitalised. The stress caused me physical damage and I collapsed.

"I'm okay now, sort of, but the court case has had a detrimental physical impact. I've been putting myself back together ever since."

The sources said Mr Leigh, an American, was being treated for an unrelated illness.

Dan Brown: Court ruled he had not copied The Holy Blood and The Holy Grail

The Da Vinci Code has sold more than 40million copies and Mr Brown's estimated £200million fortune grew even further when it was made into a film starring Tom Hanks.

But Mr Baigent and Mr Leigh accused him of "saving time and effort" on research by borrowing the "central theme" of their book published in 1982.

They had co-written The Holy Blood And The Holy Grail - a controversial bestseller in its own right - along with a third man and insisted Mr Brown had flagrantly copied their work.

The Holy Blood And The Holy Grail reports theories that Jesus Christ and Mary Magdalene married and had a child and that their blood line continues to this day.

The central hypothesis is that Christ's descendants have been protected by secret societies such as the Knights Templar and the Priory of Sion, one of whose "grand masters" is said to have been Leonardo da Vinci.

In The Da Vinci Code, the marriage of Jesus and Mary and their surviving relatives, who have been protected by the same societies, is central to the plot.

Mr Brown mentions Mr Leigh and Mr Baigent's work in his novel when his character Sir Leigh Teabing - a combination of Leigh and an anagram of Baigent - takes a copy off his bookshelf.

The two authors said they were "extremely disappointed" by the Appeal Court ruling in favour of Random House, which published The Da Vinci Code in 2003.

In a statement they said: "We brought the case because we meticulously researched The Holy Blood And The Holy Grail. It took us five years and was a labour of love.

"We embarked on legal action before The Da Vinci Code became a best-seller."

Mr Baigent said: "We just thought our material was unfairly exploited and we felt bound to challenge it. We did our best and we lost."

The two men began their legal action in the High Court last year. After losing the case they pursued the claim through the Court of Appeal.

The ruling means they must pay 85 per cent of Random House's legal costs, estimated at £1.3million. They must also pay their own legal costs, put at more than £1million.

Random House was awarded the costs of the appeal, put at £300,000 for each side.

Mr Brown has said the accusations were "completely fanciful" and that The Holy Blood And The Holy Grail was just one of the works studied for his novel.

Gail Rebuck, head of Random House, said: "Misguided claims are not good for authors, and not good for publishers.

"But we are glad the Court of Appeal has upheld the original judgment and that, once again, common sense and justice have prevailed, helping to ensure the future of creative writing in the UK."

But the Court of Appeal backed the High Court's decision to throw out their claim for damages for infringement of copyright, leaving them with a £3million legal bill.

Sources said both Mr Baigent and Mr Leigh were "seriously ill" as a result of the stress brought on by their battle.

Mr Baigent, a New Zealander, told the Daily Mail: "The stress of the last two years has been burning away inside me. I ended up being hospitalised. The stress caused me physical damage and I collapsed.

"I'm okay now, sort of, but the court case has had a detrimental physical impact. I've been putting myself back together ever since."

The sources said Mr Leigh, an American, was being treated for an unrelated illness.

Da Vinci Code stars Tom Hanks and Audrey Tatu

The Da Vinci Code has sold more than 40million copies and Mr Brown's estimated £200million fortune grew even further when it was made into a film starring Tom Hanks.

But Mr Baigent and Mr Leigh accused him of "saving time and effort" on research by borrowing the "central theme" of their book published in 1982.

They had co-written The Holy Blood And The Holy Grail - a controversial bestseller in its own right - along with a third man and insisted Mr Brown had flagrantly copied their work.

The Holy Blood And The Holy Grail reports theories that Jesus Christ and Mary Magdalene married and had a child and that their blood line continues to this day.

The central hypothesis is that Christ's descendants have been protected by secret societies such as the Knights Templar and the Priory of Sion, one of whose "grand masters" is said to have been Leonardo da Vinci.

In The Da Vinci Code, the marriage of Jesus and Mary and their surviving relatives, who have been protected by the same societies, is central to the plot.

Mr Brown mentions Mr Leigh and Mr Baigent's work in his novel when his character Sir Leigh Teabing - a combination of Leigh and an anagram of Baigent - takes a copy off his bookshelf.

Last night the two authors said they were "extremely disappointed" by the Appeal Court ruling in favour of Random House, which published The Da Vinci Code in 2003.

In a statement they said: "We brought the case because we meticulously researched The Holy Blood And The Holy Grail. It took us five years and was a labour of love.

"We embarked on legal action before The Da Vinci Code became a best-seller."

Mr Baigent said: "We just thought our material was unfairly exploited and we felt bound to challenge it. We did our best and we lost."

The two men began their legal action in the High Court last year. After losing the case they pursued the claim through the Court of Appeal.

The ruling means they must pay 85 per cent of Random House's legal costs, estimated at £1.3million. They must also pay their own legal costs, put at more than £1million.

Random House was awarded the costs of the appeal, put at £300,000 for each side.

Mr Brown has said the accusations were "completely fanciful" and that The Holy Blood And The Holy Grail was just one of the works studied for his novel.

Gail Rebuck, head of Random House, said: "Misguided claims are not good for authors, and not good for publishers.

"But we are glad the Court of Appeal has upheld the original judgment and that, once again, common sense and justice have prevailed, helping to ensure the future of creative writing in the UK."