SAN FRANCISCO -- A man is praying, 10 pews back.

Lord God, Lamb of God, who takes away the sins of the world, have mercy on us. Lamb of God, who takes away the sins of the world, have mercy on us. Lamb of God, who takes away the sins of the world, grant us peace.

When he prays he makes the words come softly from his mouth and they are words he has said on the Sundays of his remembered life; he said them 40 years ago with his mother and father flanking him on the wooden pew, and he said them in the seminary when the sun had not yet made light in the stained-glass windows, and he said them in Latin syllables that rise in him still when he wants them, and sometimes when he does not. Agnus dei qui tollis peccata mundi; miserere nobis.

When he dreams about the seminary, the dreams are in Latin and he is fluent again, which gives him pleasure. He is Roman Catholic, 49 years old, of German and Irish descent, and gay. Homosexual, he would have said, in the years when he first knew he was. He goes to mass. He has had lovers. These things are intertwined and by now inseparable, one from the other, and today he is a Catholic man who has no wish this frenzied week to see or hear or celebrate the visit of the pope.

The pope arrives this afternoon in San Francisco, the penultimate American stop of the 1987 papal tour. In San Francisco there are a great many Catholics who will crowd to greet the Holy Father, and there are also a great many people who will object to him, to his teachings, to the letters that issue from his church. Jews and feminists will speak publicly here against Pope John Paul II, and at nearly every stop he makes, because this is San Francisco, gay menand women will gather to voice their sentiment toward church authorities who describe homosexuality, in the words of the famous Vatican City letter issued last November, as "more or less a strong tendency ordered toward an intrinsic moral evil."

All-night vigils are planned, and candlelight processions by gay men and lesbians, and public rallies with loudspeakers directed near the Catholic churches where the pope will give his blessings. Outside St. Mary's, the modern white cathedral whose single streamlined spire rises straight up above the center of San Francisco, the Catholic gay and lesbian organization Dignity has planned a Friday service to pray, as Dignity leaders describe it, "for the enlightenment of the pope."

Alvin Schaaf thought for a while that he might do that, too, or that he would go to Geary Boulevard, where the bulletproof automobile will pass, and he would stand with the protesters. He thought he would not hold a sign, because he is a quiet man and not given to strident display, but it seemed to him a useful thing to go and by his presence make his credo -- I am Catholic. I am gay. I do not believe this pope transmits the word of God.

"If he spoke with the voice of God," says Alvin Schaaf, "the only thing that would come out of his mouth is the truth."

Portrait of a dissident believer: smoke-colored glasses, graying hair, trim, dark mustache. Slender. His voice is slow and gentle and he carries himself in a way that is almost retiring but manages instead to be collected and kind. In his office at the city recreation and parks department he wears good shirts and ties, with a gold pen in the breast pocket; in Sunday church, the papal visit looming, he has a faded blue Hawaiian shirt over his khaki pants and he is singing very softly because he is uncertain about the sound of his own voice.

Joyful, joyful, we adore you,

God of glory, Lord of love,

Hearts unfold like flowers before you,

Opening to the sun above.

Alvin Schaaf, who was born in Missouri to a family that for three generations has buried its dead outside the Benedictine monastery a half hour's drive from his small home town, goes to mass in a cream-colored San Francisco church at 18th and Diamond streets. The church is called Most Holy Redeemer, and a skateboard let go at the corner would roll straight past the front windows of what 10 years ago were some of the most celebrated gay bars in the United States. The services here are not organized by Dignity, but in the pews with Alvin Schaaf are many men, some of them muscled and some of them frail; behind him, nodding his greeting, a parishioner ducks his head enough to show the purpled skin that means he will die of AIDS.

In the pews are women, too, most of them elderly and wearing cloth scarves. The priest is young. A parishioner called to the pulpit for the reading; his voice is strong and he is reading from the writings of St. Paul. " 'You shall love your neighbor as yourself,' " he reads. " 'Love never wrongs the neighbor. Hence love is the fulfilment of the law.' "

The parishioner stops and looks up at the congregation. "This is the word of the Lord," he says.

The congregation, as one: "Thanks be to God."

Alvin Schaaf leans over to whisper. "The pope should read that passage," he says.

In Dignity, which was recently forced in many states to leave Catholic churches where the gay parishioners had been holding their services, a syllogism of surpassing comfort keeps the men and women holding to the church in which many of them were raised. God made me; I am gay; God would not direct His creation toward an intrinsic moral evil.

"Why would God make 10 percent of the population homosexual, and then ask 90 percent to oppress them?" asks Diane LeBlanc, a San Francisco developer who serves on Dignity's local board of directors. "I have problems believing that."

In October 1986, with the approval of Pope John Paul II, the Vatican released what was formally called its Letter to the Bishops of the Catholic Church on the Pastoral Care of Homosexual Persons. "The issue of homosexuality and the moral evaluation of homosexual acts have increasingly become a matter of public debate, even in Catholic circles," the letter began, and in the ensuing 13 pages church authorities outlined the posture that provoked full-page rebuttal advertisements from Dignity, which culled the strongest language for the headline over its ad.

" 'INTRINSIC MORAL EVIL,' " the Dignity ad read. " ' ... AN OBJECTIVE DISORDER ... BEHAVIOR TO WHICH NO ONE HAS ANY CONCEIVABLE RIGHT.' " Genesis is cited in the Vatican letter, and Leviticus, and Corinthians and Romans; in each of these biblical passages, the letter maintained, homosexual behavior is condemned as a sin. The inclination itself is not necessarily sinful, the letter said, but the Catholic Church "celebrates the divine plan of the loving and life-giving union of men and women in the sacrament of marriage. It is only in the marital relationship that the use of the sexual faculty can be morally good. A person engaging in homosexual behavior therefore acts immorally."

It was strong language, particularly in its references to the "pro-homosexual movement" and "those who may have been tempted to believe its deceitful propaganda," but it marked no profound change of doctrine; even in San Francisco, where the archdiocese has worked toward a mollifying posture and some local priests are openly "gay-sympathetic," as the language delicately puts it, the official Roman Catholic position has always condemned sexual behavior outside of conventional marriage.

"Granted, this places someone who is homosexually oriented in a position of celibacy -- it doesn't make them an evil person," says Deacon Norman Phillips, a Texas cleric now working in the San Francisco archdiocese. "I know some gays feel they can develop a licit relationship, what they consider a licit relationship, but the church doesn't see it that way. And I doubt sincerely that the church is going to change its mind."

This is the church, then, that Alvin Schaaf still calls his own. When he takes communion a kind of peace comes around him and the God he perceives is near enough to contemplate. He was an altar boy when the smallest cassocks still dragged around him on the ground; when he was 13 his father drove him to the seminary at Conception, Mo., 30 miles from home. His father embraced him, although he was not a demonstrative man, and kissed him hard on the cheek before he drove away.

Schaaf thought, for a while, that he would become a priest. The seminary rose up in massive red brick amid the cornfields and cattle ranches and in the morning, before dawn, the students moved in silence to the pews of the basilica. After consecration the tabernacle held the body and blood of Christ, and this was a thing that would not change; Schaaf would be a priest, would wear the cassock, would say the mass and serve God. His family would bask in him. He would live all his life as a celibate. He was homosexual and had known it since the onset of his first sexual feelings, but he says now that the homosexuality itself did not seem insupportable; as far as he could see the problem was sexuality of any sort, and so his impure thoughts seemed no deeper evil than the heterosexual impure thoughts being unburdened in the next confessional.

"Then along came 1960." Schaaf smiles. In the years building toward the second Vatican Council Alvin Schaaf was in his early twenties, a seminarian studying by now in Denver and well en route to the priesthood, and the mood of the changing church took him with it into what he remembers now as arguments of terrible passion. What was it that made Protestants wrong? Why ought priests not to marry? What evidence existed for the infallibility of the pope? How could one know that masturbation was a sin? Who were the authorities, finally, to prove that homosexual love was a sentiment to be condemned?

"Any time any question was posed, the response was, 'It is not -- ' " Schaaf extends one warning finger, in the manner of an admonishing superior. "We didn't have intellectual freedom to investigate, or to ponder ... They would say, 'Rene' Descartes was wrong.' "

The priesthood, Schaaf decided, was not what suited his life. He thought he might become a teacher. Some months after he left the seminary he walked for the first time through the doors of what he knew to be a gay bar, and Schaaf says that was the world that now took him in, the church receding rapidly and without particular pain. Sunday masses emptied of their meaning. The sense of God diminished, especially a condemnatory or judgmental God. It was not until his late thirties, when he was living in San Francisco and moved again by some massive need for a thing he now calls "spirituality," that he saw he might find it again in the Catholic Church.

"It is a place where I can feel comfortable about sitting in silence and connecting with whatever is out there, up there, over there," Schaaf says. "It is my heritage. I see no point in whacking that off any more than I see disengaging half of my German heritage because of their nasty habit of creating world wars. I could do that, but that's part of me. I was born and reared into the Catholic faith, and for me to say I'm not that is denying a piece of myself."

The Catholic Church, Alvin Schaaf believes, is an institution much wider and richer than the man who occupies the papacy. He believes the pope is wrong about the role of women in the church, that he is wrong in his absolute condemnation of birth control, and that he is quite wrong in his views about homosexual people who do not wish to spend their lives as celibates.

"If the church says two and two are five, I'm going to say, 'I think you're wrong, because I happen to think two and two are four,' " Schaaf says. " 'And you ought to go back to the drawing board and recompute. And somewhere down the line you're going to see that two and two are four.' "

He can believe this, he says, and still find solace in the mass, in the teachings of Christ, in the history he breathes when he kneels at the pew.

"The Lord be with you," says the priest in Alvin Schaaf's Catholic church.

"And also with you," says Alvin Schaaf.

The priest has something to say this morning about the papal visit, about the motorcade and the reporters and the personal physician and the bulletproof automobile. Jesus wore a burlap tunic, says the priest. Jesus spoke, says the priest, of forgiveness, unlimited forgiveness, of forgiving 70 times seven times, of forgiving even when someone has caused a person some awful and memorable hurt.

"Nothing is too big for us to forgive," says the priest.

There is silence in Most Holy Redeemer Church, and prayer, and the readying of communion.

"Deliver us from the burden of an unforgiving spirit," says the priest.

"Lamb of God," says Alvin Schaaf.