ROME — For generations, homosexuality has largely been a taboo topic for the Vatican, ignored altogether or treated as “an intrinsic moral evil,” in the words of the previous pope.

In that context, brief remarks by Pope Francis suggesting that he would not judge priests for their sexual orientation, made aboard the papal airplane on the way back from his first foreign trip, to Brazil, resonated through the church. Never veering from church doctrine opposing homosexuality, Francis did strike a more compassionate tone than that of his predecessors, some of whom had largely avoided even saying the more colloquial “gay.”

“If someone is gay and he searches for the Lord and has good will, who am I to judge?” Francis told reporters, speaking in Italian but using the English word “gay.”

Francis’s words could not have been more different from those of Benedict XVI, who in 2005 wrote that homosexuality was “a strong tendency ordered toward an intrinsic moral evil,” and an “objective disorder.” The church document said men with “deep-seated homosexual tendencies” should not become priests.