NEW DELHI— Google Inc. said Thursday that Indian law-enforcement agencies asked the company to block links on its YouTube video-sharing site that led to copies of a documentary about a 2012 gang rape and murder in Delhi.

Indian police sought and received a court order earlier this week banning broadcast of the film “India’s Daughter,” which tells the story of the brutal attack that galvanized public opinion in India and tarnished the nation’s image abroad.

The court said comments by one of the convicted rapists, Mukesh Singh, who was interviewed in the documentary could cause “huge public outcry.” The court order also banned publication of Mr. Singh’s comments.

The British Broadcasting Corp. showed the film Wednesday evening in the U.K. Internet users then uploaded the documentary on YouTube, where Indian viewers were able to see it early Thursday.

Gaurav Bhaskar, a Google spokesman in India, said that by later Thursday the company had “complied with the court order and blocked access to those web links” specified by law-enforcement authorities.