Pope Francis on Wednesday voiced support for same-sex couples, calling them "children of God" and saying they should be allowed to have legally recognised civil unions, in a radical shift from previous pontiffs.

The pope, whose opposition to gay marriage remains unchanged, said in a documentary premiered at the Rome Film Festival: "These are children of God, they have the right to a family.

"What we have to create is a law of civil union, they have the right to be legally protected. I have defended that," he said in film-maker Evgeny Afineevsky's "Francesco".

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 while Francis has previously spoken about same-sex unions, he has always voiced opposition to gay marriage, saying that marriage should only be between a man and 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 took an unprecedented welcoming tone towards LGBTQ individuals, launching his famous phrase, "Who am I to judge?" and welcoming gay couples to the Vatican on several occasions.

According to his biographer, the future pope backed civil unions for gay couples while he was still the archbishop of Buenos Aires
According to his biographer, the future pope backed civil unions for gay couples while he was still the archbishop of Buenos Aires AFP / Alberto PIZZOLI

The two-hour documentary screened on Wednesday traces the seven years of his pontificate and his travels.

Among the most moving moments of the film is the Pope's phone call to a gay couple, parents of three young children, in response to a letter they sent him saying how ashamed they were to bring their children to their parish.

Francis invites them to continue to go to church regardless of the judgements of others.

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

And on his first foreign trip as pope, to Brazil in 2013, he asked "who am I to judge?" about members of the LGBTQ community.

He has since received many gay people for private audiences, infuriating the Church's more conservative wing.

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'," Cruz recalled in the film.

The Pope's favourable stance on civil unions marks a step away from a 2003 document prepared by the Vatican's dogma office, the Congregation for the Doctrine of the Faith.

At the time, the body opposed official recognition for gay individuals, saying it could "devalue the institution of marriage", said Vatican expert Christopher Lamb of British Catholic newspaper The Tablet.

The assessment was prepared by then-Cardinal Joseph Ratzinger, the future Pope Benedict XVI.

By contrast, in 2014 the secretary-general of an important synod (gathering of bishops) Bruno Forte called for gay couples to enjoy legal recognition.

In a paper, the clerics wrote that "Homosexuals have gifts and qualities to offer to the Christian community. Are we capable of welcoming these people, guaranteeing to them a fraternal space in our communities?"