When reports spread that Pope Francis had used an offensive anti-gay slur while speaking to Italian bishops at a conference last month, many Catholics were both shocked and baffled. How could a pope known for his openness to and acceptance of L.G.B.T.Q. people use homophobic slang and caution prelates about admitting gay men into seminaries?

But the question, and the apparent inconsistency in Francis’ messaging, reflect the deep contradictions and tensions that underlie the Roman Catholic Church’s and Francis’ relationship to homosexuality.

The church holds that “homosexual tendencies” are “intrinsically disordered.” When it comes to ordination, the church’s guidelines state that people with “deep-seated” gay tendencies should not become priests.

Yet ordination has also long been a refuge of sorts for homosexual Catholic men, according to researchers and priests, who say that at least thousands of clergymen are gay, though only a few are public about their sexual orientation because of the stigma it still carries in the church.

While in the past all of these contradictions were muffled by an aura of taboo, Francis’ recent off-the-cuff comments have thrown them into the open.

“The pope lifted the veil,” said Francesco Lepore, a former Latinist at the Vatican who left the church, came out as gay and became an activist.