MUMBAI: India's Supreme Court on Thursday cleared the way for the release of a controversial Bollywood movie based on an epic poem about a 14th-century queen, a day after its producers went to court to fight bans by several states.

The film "Padmaavat" ran into trouble after groups critical of the project accused its director, Sanjay Leela Bhansali, of distorting history by portraying a Muslim ruler as the "lover" of Queen Padmavati of the Hindu Rajput warrior clan.

"We direct that there shall be a stay of operation on the notification and orders issued," the judges said in their interim order, which barred similar measures by other states.

Indian films that touch upon the historical relationships of Hindus, India's majority religion, and Muslim leaders are often controversial.

At least four Indian states, among them central Madhya Pradesh, had banned the film, citing security threats, despite its clearance by a censor panel, the Central Board of Film Certification (CBFC).

A school in Madhya Pradesh was vandalised this week by protesters after students danced to a song from the film, which is set to open in theatres on Jan 25.

Despite the scrapping of the ban, fears of protests, particularly by right-wing groups, such as the Shri Rajput Karni Sena, still overshadow screenings.

The group's leader, Sukhdev Singh, told reporters it would not allow the film to be released, while other groups have threatened to burn down theaters that show the film.

"The movie should not run," domestic media quoted Singh as saying. "The public should enforce a curfew at cinema halls."

Members of hardline Hindu fringe groups, as well as Prime Minister Narendra Modi's ruling Bharatiya Janata Party, have criticised the film.

The censor panel cleared the film late last year, suggesting modifications such as changing the name to "Padmaavat" from "Padmavati" to reflect that the source material was a poem, rather than actual historical events.

Based on a poem by Malik Muhammad Jayasi, the film tells the story of Padmavati and the Mughal conqueror Alaudin Khilji.

(Reporting by Swati Bhat and Shilpa Jamkhandikar; Editing by Clarence Fernandez) ((swati.bhat@thomsonreuters.com; twitter.com/swatibhat22; +91-22-61807353; Reuters Messaging: swati.bhat.thomsonreuters.com@reuters.net))