A judge in Brazil has ordered Netflix to stop showing a film that depicts Jesus as a gay man.

The First Temptation of Christ (A Primeira Tentação de Cristo), which began streaming on Netflix in December last year, is a TV special that sees the son of God return home to Mary and Joseph with a ‘friend’ called Orlando, who is presumed to be his boyfriend.

The film was produced by Portuguese troupe Porta dos Fundos, who are known for producing irreverent comedies, with some of their content being compared to Monty Python sketches.

Following its release, over two million people signed a petition to have the film taken down for “seriously offending Christians” and the creator’s headquarters were even attacked with a petrol bomb on Christmas Eve.

Now, Rio de Janeiro judge Benedicto Abicair has issued a ruling that Netflix must stop showing the “blasphemous” film, saying it will be “beneficial not only to the Christian community, but to Brazilian society which is mostly Christian.”

It contradicts previous rulings from Rio de Janeiro and São Paulo, who had rejected calls for the film to be banned.

Both Netflix and Porta dos Fundos have declined to comment on the decision, according to Sky News.

Fábio Porchat, a co-founder of Porta dos Fundos, previously defended the film and said criticism was homophobic, especially as everyone focused in on the small part of Jesus’s sexuality.

Speaking to Variety, he said: “It doesn’t incite violence, we’re not saying people shouldn’t believe in God. They [Netflix] haven’t said anything to us like, ‘Maybe we should stop making the special available.’ They support freedom of speech.

“If anybody should be angry with us, it should be the gay community because a gay character turns out to be the Devil. But the gay community loves us!”

Related: Brazil’s biggest newspaper just published a gay Marvel kiss on the front page to protest mayor’s homophobia