I HEARD a joke the other day about a pious soul who dies, goes to heaven, and gains an audience with the Virgin Mary. The visitor asks Mary why, for all her blessings, she always appears in paintings as a bit sad, a bit wistful: Is everything OK?
Mary reassures her visitor: "Oh, everything's great. No problems. It's just .•.•. it's just that we had always wanted a daughter."
That story comes to mind as the Vatican wrestles with the consequences of a patriarchal premodern mind-set: scandal, cover-up, and the clumsiest self-defense since Watergate. That's what happens with old boys' clubs.
It wasn't inevitable that the Catholic Church would grow so addicted to male domination, celibacy, and rigid hierarchies. Jesus himself focused on the needy rather than dogma, and went out of his way to engage women and treat them with respect.
The first-century church was inclusive and democratic, even including a protofeminist wing and texts.
The Gospel of Philip, a gnostic text from the third century, declares of Mary Magdalene: "She is the one the Savior loved more than all the disciples." Likewise, the Gospel of Mary (from the early second century) suggests that Jesus entrusted Mary Magdalene to instruct the disciples on his religious teachings.
St. Paul refers in Romans 16 to a first-century woman named Junia as prominent among the early apostles, and to a woman named Phoebe who served as a deacon. The Apostle Junia became a Christian before St. Paul did (chauvinist translators have sometimes rendered her name masculine, with no scholarly basis).
Yet over the ensuing centuries, the church reverted to strong patriarchal attitudes, while also becoming increasingly uncomfortable with sexuality. The shift may have come with the move from house churches, where women were naturally accepted, to more-public gatherings.
The upshot is that proto-feminist texts were not included when the Bible was compiled (and were mostly lost until modern times). Tertullian, an early Christian leader, denounced women as "the gateway to the devil," while a contemporary account reports that the great Origen of Alexandria took his piety a step further and castrated himself.
The Catholic Church still seems stuck today in that patriarchal rut. The same faith that was so pioneering that it had Junia as a female apostle way back in the first century can't even have a woman as the lowliest parish priest. Female deacons, permitted for centuries, are banned today.
That old boys' club in the Vatican became as self-absorbed as other old boys' clubs, such as Lehman Brothers, with similar results. And that is the reason the Vatican is floundering today.
But there's more to the picture than that. In my travels around the world, I encounter two Catholic Churches. One is the rigid all-male Vatican hierarchy that seems out of touch when it bans condoms even among married couples where one partner is HIV-positive.
To me, at least, this church - obsessed with dogma and rules and distracted from social justice - is a modern echo of the Pharisees whom Jesus criticized.
Yet there's another Catholic Church as well, one I admire intensely. This is the grass-roots Catholic Church that does far more good in the world than it ever gets credit for. This is the church that supports extraordinary aid organizations such as Catholic Relief Services and Caritas, which save lives every day, and that operates superb schools that provide needy children an escalator out of poverty.
This is the church of the nuns and priests in Congo, toiling in obscurity to feed and educate children. This is the church of the Brazilian priest fighting AIDS who told me that if he were pope, he would build a condom factory in the Vatican to save lives.
This is the church of the Maryknoll Sisters in Central America and the Cabrini Sisters in Africa. There's a stereotype of nuns as stodgy Victorian traditionalists.
I learned otherwise while hanging on for my life in a passenger seat as an American nun with a lead foot drove her Jeep over ruts and through a creek in Swaziland to visit AIDS orphans. After a number of encounters like that, I've come to believe that the very coolest people in the world today may be nuns.
So when you read about the scandals, remember that the Vatican is not the same as the Catholic Church.
Ordinary lepers, prostitutes, and slum dwellers may never see a cardinal, but they daily encounter a truly noble Catholic Church in the form of priests, nuns, and lay workers toiling to make a difference.
It's high time for the Vatican to take inspiration from that sublime - even divine - side of the Catholic Church, from those church workers whose magnificence lies not in their vestments, but in their selflessness.
They're enough to make the Virgin Mary smile.
Nicholas D. Kristof is a columnist for the New York Times.