For the first four decades of his life, Marshall Herff Applewhite strove above all to do his father proud. He followed his father, a Presbyterian minister, into the seminary, devoted himself to his church, married and had two children. He taught music at a Catholic college, led choruses at Episcopalian and Unitarian churches, and sang with the Houston Grand Opera.

But by the early 1970s, Applewhite, who this week led 38 members of his UFO cult to join him in a fatal cocktail of phenobarbital and vodka in California, could no longer hide his secret: For several years, according to friends and former cult members, Applewhite had been engaging in homosexual relationships.

In 1970, he was fired from his post as a music professor at Houston's University of St. Thomas, after administrators there learned that Applewhite was in a relationship with a male student, according to local news accounts. The Catholic university called the reason for the firing "health problems of an emotional nature."

Depressed, ashamed and suddenly hearing voices, Applewhite checked into a psychiatric hospital the following year and asked to be "cured" of his homosexual desires, according to James Lewis, the author of a book on UFO cults, Robert Balch of the University of Montana, and former members of the cult known most recently as Heaven's Gate.

Applewhite felt guilty about his homosexual affairs and, according to Balch, "confided to at least one of his lovers his longing for a meaningful, platonic relationship where he could develop his full potential without sexual entanglements."

At the hospital, he met a nurse, Bonnie Lu Trousdale Nettles, who would lead him into a new kind of spirituality.

Together, they would renounce all sexuality. In 1988, Applewhite wrote of himself and Nettles that "the only relationship they shared, certainly having no physical attraction toward each other, was the compulsion to discover what had brought them together. . . ."

At some point, Applewhite had himself castrated.

Together, Applewhite and Nettles would recruit hundreds of followers around the country and require them to dress alike, cut their hair and repress any sexual identity. And together, they would concoct a theology in which the human body was a mere vessel for an asexual soul that could find salvation only in its home in outer space.

"Applewhite was so alienated from his homosexuality that he was teaching people not to have sex," said Lewis of the Institute for the Study of American Religion, who has studied Applewhite and Nettles' group for more than 20 years. "He would put people of opposite sexes together and force them to learn to become neutral, nonsexual."

Followers of the cult in the mid-1970s were subjected to strict discipline including hard rules, "No sex, no human-level relationships, no socializing," according to Balch, who infiltrated the group for two months in 1975.

When the suicide victims at Rancho Santa Fe, Calif., turned out this week to be dressed so much alike that police at first believed them all to be male, Lewis and other cult experts saw the ultimate expression of Applewhite's renunciation of sexuality. "Their idea of perfection was a kind of androgyny," Lewis said. "All buzz cuts, all dressed to erase any trace of sexuality. I think I would have considered suicide too."

In his vast writings on his spiritual journey, Applewhite provides a sketchy account of his life in the early '70s. Writing under his cult moniker "Do," he described himself, with rare reserve, as "a divorcee who had lived with a male friend for some years, {and} was contentedly involved in cultural and academic activities."

In the early 1970s, when Applewhite was wrestling with his secret, science's view of homosexuality was evolving rapidly.

Some psychologists still believed it possible to "cure" homosexuality, but most concluded that sexual orientation is immutable.

In 1974, the American Psychiatric Association removed homosexuality from its list of mental disorders. Today, most therapists encourage gay people to accept their sexuality.

The videotapes of Applewhite's final statements show him to be delusional, sexually repressed, and suffering from a rare case of clinical paranoia, said Louis Jolyon West, professor of psychiatry at the University of California at Los Angeles School of Medicine. Like Lewis, West found particular importance in Applewhite's repeated comments that his relationship with Nettles was not sexual, in his insistence that his followers be celibate, and in the gruesome discovery that some of the men in the group had been castrated.

Applewhite never told his family about his homosexuality. Instead, he told his sister, Louise Winant, that he had a heart problem and was checking into the hospital for help. Winant said her brother told her only of an unspecified "near-death experience."

In his rambling 1988 treatise tracing the evolution of his UFO philosophy, Applewhite wrote that, "For about a year before they {he and Nettles} met, their lives seemed to encounter severe upheaval and personal confusion."

"He had an illness in Houston and one of the nurses there told him that he had a purpose, that God kept him alive," Winant told the Associated Press yesterday. "She sort of talked him into the fact that this was the purpose -- to lead these people -- and he took it from there."

Winant said Applewhite and Nettles immediately became inseparable. Nettles was also an astrologer and, according to several academic studies of the group, had dabbled in numerous metaphysical theologies, combining Christian ritual with elements of paganism, science fiction and millennialism.

In a matter of months, Applewhite left his wife and children, left his church, and then, with Nettles, left Houston to begin a nomadic spiritual journey that ended with the horror of mass suicide and Applewhite's own death at 66. Nettles died of cancer in 1985.

The man who would lead groups known variously as Heaven's Gate, Total Overcomers Anonymous and H.I.M. was always a searcher. Applewhite stumbled along a 45-year spiritual odyssey that stretched from prep school to Union Theological Seminary in Richmond, and from there to an unhappy career as a music professor and sometime opera singer.

Born in Spur, Tex., Applewhite attended Austin College, a Presbyterian-affiliated institution in Sherman, Tex., then studied music at the University of Colorado, where he played the lead in "South Pacific" and "Oklahoma."

After he married, the couple moved to New York, where he hoped to become a professional singer. He also sang and studied music in Germany, according to his biography in a 1966 Houston Grand Opera program.

In 1952, he enrolled at the Presbyterian seminary in Richmond, where he spent one year. Hal Todd, vice president of the seminary, said the year there appeared to be unremarkable.

Applewhite was recruited in 1953 by the minister of the First Presbyterian Church in Gastonia, N.C., to become the choir director, according to Edith Warren, 72, a member of the church. Warren, who described herself as a close friend of Applewhite and his wife, Ann, at the time, called Applewhite "very personable, very intelligent."

"He and his wife, I just enjoyed being with them," Warren said from her home in Gastonia yesterday. Warren said Applewhite and his wife lived in a rented apartment during the two years they were in Gastonia. She said the couple gave birth to a boy while they lived in the town. "He was quite a musician and had a beautiful voice," she said.

Warren said the couple left when Applewhite went into the military.

By the 1960s, Applewhite was seeking satisfaction in his music, directing choruses at St. Mark's Episcopal Church and at First Unitarian Church of Houston.

In 1966, Applewhite was hired as a music teacher at the University of St. Thomas. Simultaneously, he won a series of major roles with the Houston Grand Opera.

As "Father" in the 1966 production of Humperdinck's opera, "Hansel and Gretel," Applewhite "boomed his tipsy tidings in a resonant, blessedly audible baritone," said a critic for Opera News. Applewhite sang 10 roles with the opera between 1964 and 1968, opera spokeswoman Tim Carman said. Applewhite sang the role of Wagner in Faust, which starred Placido Domingo.

Applewhite would play many more roles in the years to come. Throughout the two decades in which he led his cult, he assumed names such as Bo, Do, Winnie, and a host of fanciful titles.

But Lewis and other cult experts said Applewhite never strayed entirely from his Christian upbringing, and to the end, his theology was based on the Book of Revelation, and its story of two witnesses who are killed, but stay dead for only 3 1/2 days. Then, they are revived and taken up in a cloud.

In their passionate desire to separate themselves from sexuality and their own bodies, Applewhite and Nettles interpreted that scripture to mean that they were going to be martyred like the biblical witnesses, taken up literally into outer space, and then resuscitated in their bodies, Lewis said.

Applewhite and Nettles believed that the soul was somehow separate from the body.

A man who had found his own body to be a crushing disappointment latched onto the hope that he could leave that body and, in death, find another.

The result was Rancho Santa Fe. The result was, as Applewhite himself once wrote, that, "We take the prize, I guess, of being the cult of cults." Staff writers Michael Shear, Dana Hull, Ken Ringle, Joel Achenbach and Justin Gillis in Washington, Laurie Goodstein in New York and special correspondents Sharon Waxman and Cassandra Stern in Los Angeles contributed to this report. Fisher reported from Washington; CAPTION: Marshall Applewhite fought his homosexuality and had himself castrated. CAPTION: Heaven's Gate founders Marshall Herff Applewhite and Bonnie Lu Trousdale Nettles, a nurse who led him to a new spirituality, in Houston in 1972. They renounced all sexuality and required followers to be nonsexual. CAPTION: Applewhite conducts Houston civic choral group sponsored by University of St. Thomas in 1969 rehearsal. CAPTION: Louise Winant, Applewhite's sister, in Corpus Christi, Tex., interview. CAPTION: In early 1970s, Applewhite was fired from a Houston college music professorship for male relationship.