A new Hollywood blockbuster starring Ben Kingsley and Harrison Ford is facing a boycott from gay rights groups enraged by the original author’s anti-gay views.

Ender’s Game, which follows a teenager sent to space to prepare for a future alien invasion, is based on the award-winning 1985 novel of the same name by the science fiction writer Orson Scott Card. The novelist has established himself as a leading opponent of same-sex marriage in the US and has even been quoted calling for homosexuality to be made illegal.

In 1990, Card is alleged to have told an interviewer: “Laws against homosexual behaviour should remain on the books, not to be indiscriminately enforced against anyone who happens to be caught violating them, but to be used when necessary to send a clear message that those who flagrantly violate society’s regulation of sexual behaviour cannot be permitted to remain as acceptable, equal citizens within that society.”

Download the new Independent Premium app Sharing the full story, not just the headlines

The gay rights group Geeks OUT is urging cinema-goers to boycott the film, due for release in the UK and US this autumn, on the grounds that anyone who buys a ticket will be putting money in Card’s pocket.

Lions Gate Entertainment, the studio behind Ender’s Game, is sufficiently concerned by the threat to have issued a statement distancing itself from Card’s opinion.

“We obviously do not agree with the personal views of Orson Scott Card,” a spokesman said. “The simple fact is that neither the underlying book nor the film itself reflect these views in any way, shape or form.” The studio added that it planned to “continue its longstanding commitment to the LGBT community” by hosting a benefit première of the film.

Card himself has responded to calls to boycott the film by asking for “tolerance” from proponents of equal marriage. He added: “Ender’s Game is set more than a century in the future and has nothing to do with political issues that did not exist when the book was written in 1984.”

Although the online campaign has gathered thousands of signatures, some high-profile LGBT figures have called the boycott “misguided”. Dustin Lance Black, who won an Oscar for writing the biopic Milk based on gay rights activist Harvey Milk, said: “Boycotting a movie made by 99 per cent LGBT equality folks in an LGBT equality industry is a waste of our collective energy.”

This is not the first time Card’s views have caused controversy. In March 2013, the DC Comics illustrator Chris Sprouse pulled out of an “Adventures of Superman” issue written by Card.