THE Pope has endorsed same-sex civil unions for the first time in what is being heralded as a "major step forward" for the Catholic Church.

While serving as archbishop of Buenos Aires, Pope Francis endorsed civil unions for gay couples as an alternative to same-sex marriages, but before today nobody had ever publicly backed civil unions as pope.

The Pope made the comments while being interviewed for the feature-length documentary Francesco, which had its premiere at the Rome Film Festival today.

The papal thumbs-up comes midway through the film, which delves into issues such as the environment, poverty, migration, racial and income inequality, and the people most affected by discrimination.

"Homosexual people have the right to be in a family," he said in one of his sit-down interviews for the film.

"They are children of God. What we have to have is a civil union law, that way they are legally covered."

READ MORE: Frosty image wins £2500 for Scottish church

Francis’ outreach to gays dates to his first foreign trip in 2013, when he uttered the now-famous words “Who am I to judge,” when asked during an airborne news conference returning home from Rio de Janiero about a purportedly gay priest.

However, the former Cardinal Jorge Mario Bergoglio was fervently opposed to gay marriage when he was archbishop of Buenos Aires. Then, he launched what gay activists remember as a “war of God” against Argentina’s move to approve same-sex marriage.

Reverend James Martin, the Jesuit priest who has been at the forefront in seeking to build bridges with homosexuals in the Church, praised the Pope's comments as "a major step forward in the church's support for LGBT people".

"The Pope's speaking positively about civil unions also sends a strong message to places where the Church has opposed such laws," he said in a statement.

One of the main people in the documentary is Juan Carlos Cruz, the Chilean survivor of clergy sexual abuse who Francis initially discredited.

Cruz, who is gay, said that during his first meetings in Chile with the Pope in May 2018, Francis told him God made him gay.

He tells his own story in snippets throughout the film, chronicling both Francis's evolution on understanding sexual abuse as well as to document the Pope's views on gay people.

Director Evgeny Afineevsky had remarkable access to cardinals, the Vatican television archives and the Pope himself.

He said he negotiated his way in through persistence and deliveries of Argentine mate tea and Alfajores cookies that he got to the Pope via some well-connected Argentines in Rome.

Afineevsky said in an interview ahead of the premiere: "Listen, when you are in the Vatican, the only way to achieve something is to break the rule and then to say 'I'm sorry'."

The director worked official and unofficial channels, starting in early 2018, and ended up so close to Francis by the end of the project that he showed the Pope the movie on his iPad in August.

The two recently exchanged Yom Kippur greetings.

Afineevsky, a Russian-born Jew who lives in Los Angeles, travelled the world to film Francesco.

READ MORE: Church of Scotland cuts: Ministers tackle Covid and consider the future

The settings include Cox's Bazaar in Bangladesh where Myanmar's Rohingya sought refuge, the US-Mexico border and Francis' native Argentina.

"The film tells the story of the Pope by reversing the cameras," said Vatican communications director Paolo Ruffini, who was one of Afineevsky's closest collaborators on the film.

Ruffini said when Afineevsky first approached him with the idea of a documentary, he tried to dampen his hopes for interviewing the Pope.

"I told him it wasn't going to be easy," he said.

But Ruffini gave him some advice - names of people who had been impacted by the Pope, even after just a brief meeting.

Afineevsky found them - refugees who Francis met on some of his foreign trips, prisoners he blessed and some of the homosexuals to whom he has ministered.

"I told him that many of those encounters had certainly been filmed by the Vatican cameras and that there he would find a veritable gold mine of stories that told a story," Ruffini said.

"He would be able to tell story of the Pope through the eyes of all and not just his own."