The Supreme Court in the capital, New Delhi, ruled in favour of the film on Thursday after its producers filed a petition challenging a ban in six states.

Set in the 14th century, the film has enraged the Rajput caste group for allegedly "disrespecting the sentiments of the community".

Hindu groups allege the film distorts history by depicting Rajput queen Padmini - the protagonist of the film - in a poor light.

Mahesh Agrawal, a lawyer representing the producers, confirmed to Al Jazeera that "the top court has today overturned the ban on the film", which will be released on January 25.

The states of Haryana, Gujarat, Himachal Pradesh, Madhya Pradesh, Rajasthan and Uttarakhand are now obliged to facilitate the screening of Padmaavat, Supreme Court lawyer Anas Tanwir said.

"This is a win for freedom of expression," he told Al Jazeera. "This order effectively means that the film will be released in these states [and a] ban on the release of this movie will have no effect."

{articleGUID}

In its ruling, the top court also blocked other states from issuing similar bans on the film.

'Not the end of the fight'

The film is an adaptation of Padmavat, an epic poem written in the 16th century by poet Malik Muhammad Jayasi.

Its original release on December 1 was put on hold amid rising anger and demonstrations, with some legislators requesting that the federal government ban the film.

Protests spun out of control to include attacks on the set and director, and threats to mutilate the lead actor, Deepika Padukone.