Francis’ comments 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 are children of God and have the right to a family,” he says in 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 favour of civil unions as pope.

Until now, Roman Catholic teaching has emphasised that while LGBTQ people are to be treated with respect, homosexual activity is sinful, “objectively disordered” and “contrary to natural law”.

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 homosexual.

Cruz tells his own story in snippets throughout the film, chronicling both Francis’ evolution on understanding sexual abuse as well as to document the pope’s views on homosexual people.