Ellen Page and Julianne Moore have been told they can no longer shoot on location at a New York Catholic Boys school for their upcoming gay rights drama, Freeheld.

According to the Guardian, Salesian high school in New Rochelle informed filmmakers that it had changed its mind initially after approving a shoot and allowing still photographs to be taken.

The school was to provide a location for a town hall where Moore, a police detective, applies for a domestic partnership with her terminally ill car-mechanic partner, Page.

The film is based on the true story of the couple Laurel Hester and Stacie Andree, and Hester’s battle to assign her pension benefits to Andree in 2005.

Producer Michael Shamberg told the Hollywood Reporter: “They turned us down because of the subject matter.”

He said he has written to the school principle, John Flaherty, saying the film is “not about gay marriage, nor are the women attempting to get married. It is about recognising the dignity of a woman who was a brave civil servant”.

Another producer, Kelly Bush, said: “Freeheld captures the inequality and bigotry that one couple faced while coping with cancer and the end of life.

“That our film was denied access to a location because of the subject matter — a same-sex couple fighting for their legal rights — illustrates just how important it is that this story be told.”

Yesterday, Ellen Page tweeted:

Using religion to justify bigotry makes me sad. Sending my support 2 the LGBT students at the school who I hope r able 2 find acceptance. — Ellen Page (@EllenPage) October 21, 2014

However, Flaherty said in an interview with Buzzfeed: “All are welcomed at Salesian High School.

“Our school chooses to embrace the social issues such as hunger, homelessness, poverty, and helping the less fortunate.”

In February, Julianne Moore has commended fellow actress Ellen Page for her decision to come out as gay.