ROME — Pope Francis endorsed same-sex civil unions for the first time as pope while being interviewed for the feature-length documentary “Francesco,” which had its premiere at the Rome Film Festival on Wednesday.

The papal thumbs-up came midway through the film that delves into issues he cares about most, including 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. They are children of God,” Francis said in one of his sit-down interviews for the film. “What we have to have is a civil union law; that way they are legally covered.”

While serving as archbishop of Buenos Aires, Francis endorsed civil unions for gay couples as an alternative to same-sex marriages. However, he had never come out publicly in favor of civil unions as pope.

The Jesuit priest who has been at the forefront in seeking to build bridges with gays in the church, the Rev. James Martin, 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,” Martin said in a statement.

One of the main characters in the documentary is Juan Carlos Cruz, the Chilean survivor of clergy sexual abuse whom Francis initially discredited during a 2018 visit to Chile.

Cruz, who is gay, said that during his first meetings with the pope in May 2018, Francis assured him that God made Cruz gay. Cruz tells his own story in snippets throughout the film, chronicling Francis' 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. 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.