The film features a 10-year-old boy who moves to England
A court in the Indian capital Delhi has rejected a lawsuit filed by Hollywood company Warner Bros against the makers of a Bollywood film Hari Puttar.
The makers of the blockbuster Harry Potter films said the title of the Indian movie was too similar.
The court said Warner Bros could have brought the case three years ago and said readers could easily distinguish Hari Puttar from Harry Potter.
The court decision means the film can now be released in India.
Mirchi Movies, the makers of the Bollywood film, said Hari Puttar had no connection with the Harry Potter movies.
Mirchi told the court that Hari was a popular Indian name, and Puttar meant "son" in Hindi and Punjabi.
"The case has been dismissed. The court said that Warner Bros had known the title of the film since 2005 and had delayed bringing the case to court until the last moment," lawyer Pratibha Singh was quoted by news agency AFP as saying.
The Delhi High Court also said that consumers who read the Harry Potter books, written by JK Rowling, were sufficiently educated to know that Hari Puttar was different, the agency quoted the lawyer as saying.
Hari Puttar tells the story of a 10-year-old boy who moves to England with his family and becomes involved in a plan to save the world.
The film is due to be released across India on Friday 26 September.
It was meant to hit Indian cinemas on 12 September, but its release was pushed back because of the court case.