Pope Francis has defended the right of gay couples to enter into a legally recognised civil union in a documentary that premiered at the Rome Film Festival on Wednesday.

In the film, Fransesco by Evgeny Afineevsky, the religious leader says that gay people have the right to be in a family.

“These are children of God, they have the right to a family,” Francis says in the film, speaking in Spanish.

“What we have to create is a law of civil union, they have the right to be legally protected. I have defended that.”

According to biographer Austen Ivereigh, the future pope backed civil unions for gay couples while he was still the archbishop of Buenos Aires and known as Jorge Bergoglio.

But Francis has been vocal about his stance of gay marriage in the past, saying that marriage should only be between a man and a woman.

“‘Marriage’ is a historic word,” he told French sociologist Dominique Wolton in a 2017 book of interviews. “Always among human beings, and not only in the Church, it has been between a man and a woman. You can’t just change that like that.”

“Since the beginning of the pontificate the Pope has spoken of respect for homosexuals and has been against their discrimination,” Vatican expert Vania de Luca told RaiNews.

“The novelty today is that he defends as pope a law for civil unions.”

After becoming pope in 2013, Francis welcomed homosexuals with his now famous phrase, “Who am I to judge?” and has invited gay couples to the Vatican on multiple occasions.

The two-hour documentary looks back at the last seven years of his pontificate and travels.

One of the most heartfelt moments in the film os when the Pope called a gay couple, parents of three young children, after they sent him a letter saying they felt ashamed to bring their children to the parish.

Francis invited them over regardless, saying to not be concerned of other people’s judgements.

In the past, he has regularly said gay people should be accepted in their parishes and urged parents not to reject their gay children.

Chilean Juan Carlos Cruz, an activist against sexual abuse within the Church, accompanied the director to the film screening on Wednesday.

“When I met Pope Francis he told me he was very sorry about what happened. Juan, it is God who made you gay and he loves you anyway. God loves you and the Pope loves you too,” says Cruz in the film.

This article originally appeared on Over60.