Rowling said she had planned to write her own Potter encyclopaedia
Author JK Rowling has won her legal battle in a New York court to get an unofficial Harry Potter encyclopaedia banned from publication.
Judge Robert Patterson said in a ruling Ms Rowling, 43, had proven Steven Vander Ark's Harry Potter Lexicon would cause her irreparable harm as a writer.
Ms Rowling sued Michigan based publishers RDR Books last year to stop publication of Mr Vander Ark's book.
He wrote the book after running a popular Potter fansite.
Following the ruling, Ms Rowling said her legal action had aimed "to uphold the right of authors everywhere to protect their own original work".
She said: "The proposed book took an enormous amount of my work and added virtually no original commentary of its own."
The statement added: "Many books have been published which offer original insights into the world of Harry Potter. The Lexicon just is not one of them."
'Gone too far'
The book had been originally due for publication on 28 November 2007, but legal proceedings prevented it from being released.
Ms Rowling had originally supported the Lexicon website, but she said there was a difference between fans publishing information for free on the internet, and selling it in the form of a book.
Steven Vander Ark ran a Potter website before writing his book
Making his ruling, Judge Patterson said reference materials could help readers, but Mr Vander Ark had gone too far in this case.
He said: "While the Lexicon, in its current state, is not a fair use of the Harry Potter works, reference works that share the Lexicon's purpose of aiding readers of literature generally should be encouraged rather than stifled."
He said he had made his decision because: "Lexicon appropriates too much of Rowling's creative work for its purposes as a reference guide".
'Not about money'
In April, Ms Rowling gave evidence in court and said the encyclopaedia amounted to "wholesale theft".
The author has always denied the case was about money.
She had been planning to write her own definitive encyclopaedia, the proceeds of which she had intended to donate to charity.
However, she told the court in April she is not sure if she has "the will or the heart" to do it after all.
At the time RDR Books argued that it is little different than any other novel reference guide and should be allowed to go to press without interference.