A US judge has dismissed a lawsuit which accused Harry Potter author J.K. Rowling of copying the work of another author.

The estate of late author Adrian Jacobs said that the plot of Rowling’s fourth book Harry Potter and the Goblet of Fire plagiarised parts of his book Willy the Wizard.

Jacob’s estate trustee Paul Allen claimed that Rowling borrowed the idea of wizards travelling on trains and the notion of a wizard contest.

Judge Shira Sheindlin said that there were major differences between the two books, adding that they were “distinctly different in both style and substance”.

U.S Harry Potter book publisher Scholastic Corp was delighted by the judge’s decision.

In a statement, the firm said: “The Court’s swift dismissal supports our position that the case was completely without merit and that comparing Willy the Wizard to the Harry Potter series was absurd.”

British Harry Potter publisher Bloomsbury said Rowling had never heard of Jacob’s book before the copyright claim was made in 2004.