Since first coming to wide notice in the late 1990s, the Harry Potter book series by J. K. Rowling has been the subject of a number of legal disputes. Rowling, her various publishers and Time Warner, the owner of the rights to the Harry Potter films, have taken numerous legal actions to protect their copyrights, and also have fielded accusations of copyright theft themselves. The worldwide popularity of the Harry Potter series has led to the appearance of a number of locally-produced, unauthorised sequels and other derivative works, leading to efforts to ban or contain them. While these legal proceedings have countered a number of cases of outright piracy, other attempts have targeted not-for-profit endeavours and have been criticised.
Another area of legal dispute involves a series of injunctions obtained by Rowling and her publishers to prohibit anyone from distributing or reading her books before their official release dates. The sweeping powers of these injunctions have sometimes drawn criticism from civil liberties and free speech campaigners and led to debates over the "right to read". One of these injunctions was used in an unrelated trespassing case as precedent supporting the issuing of an injunction against a John Doe.
Outside these controversies, a number of particular incidents related to Harry Potter have also led, or almost led, to legal action. In 2005, a man was sentenced to four years in prison after firing a replica gun at a journalist during a staged deal for stolen copies of an unreleased Harry Potter novel, and attempting to blackmail the publisher with threats of releasing secrets from the book. Then in 2007 Bloomsbury Publishing contemplated legal action against the supermarket chain Asda for libel after the company accused them of overpricing the final Harry Potter novel, Harry Potter and the Deathly Hallows.