Two years ago, during a visit to Washington's Whitman-Walker Clinic, Macel, a 20-year-old Washington clerk, learned that a blood test showed he was infected with the AIDS virus. Counselors told him that although he might never develop the disease, he must use a condom every time he had sex to protect his partner and himself.

Macel, who is gay, agrees that the recommendation that he practice "safer sex" and avoid anal intercourse -- the sexual activity most likely to transmit AIDS -- is sensible. One of his former lovers died of AIDS and, he says, the disease "is very scary and very real to me." He knows that he can transmit the virus to others in blood and semen and that he can be reinfected by his partners, a circumstance that could hasten the onset of AIDS.

But for reasons Macel says he does not fully understand, he has trouble following the advice repeatedly given to him by health care workers. Four months ago, he was diagnosed with rectal gonorrhea, a clear indication that his partner was not using a condom, which provides the only protection against sexually transmitted diseases. Macel, who said he has had gonorrhea a dozen times since 1982, returned to Whitman-Walker's Gay Men's VD Clinic last week for a preventive check-up and several tests.

"I try to use a condom every time," said Macel, who asked that his full name not be used, "but sometimes it gets in the way or my partner doesn't want to."

Macel is typical of a small but significant group that has received little attention in the torrent of publicity about AIDS: gay and bisexual men who, despite repeated counseling in AIDS prevention, persist in engaging in high-risk sex and not using condoms. Some have acquired immune deficiency syndrome, a fact they do not disclose to their partners. Others, like Macel, have tested positive for infection with the virus.

"There is an amazing amount of anonymous casual sex still occurring," said Tom O'Donnell, nursing services coordinator for the Whitman-Walker Clinic, which provides services to gays and AIDS patients. "There are a lot of reasons -- misinformation, lack of self-worth, impulsiveness, compulsive behavior, alcohol or drug use" and, especially, denial.

Researchers are beginning to study this group, which they stress represents only a small segment of gay men, who account for two-thirds of the 45,000 American AIDS cases.

Numerous studies in New York, San Francisco and other cities have shown that homosexual men have radically altered their behavior because of AIDS -- a change reflected in a dramatic drop in the rate of sexually transmitted diseases once widespread in the gay community. The Centers for Disease Control reports that between 1986 and 1987, syphilis cases dropped by 51 percent among gay men in New York City, but jumped 100 percent among heterosexual men. In January 1979, 522 cases of rectal gonorrhea were reported among gay men in San Francisco. In January 1986, 38 were reported.

The question of what makes people change their behavior -- and the reasons others do not -- is at the heart of the national debate about how best to control the spread of AIDS. Researchers say that the experiences of the gay community, where behavioral change has been most dramatic, may provide valuable lessons in dealing with heterosexuals who are showing alarming increases in the rate of sexually transmitted diseases. Public health officials are particularly worried because a history of sexually transmitted disease is associated with increased risk for AIDS.

The issue of prosecuting infected persons for having unprotected sex without informing their partners also is raising unprecedented legal and ethical questions. A recent book disclosed that Gaetan Dugas, a Canadian flight attendant dubbed "Patient Zero" by the CDC, repeatedly flouted warnings that he was infectious and deliberately exposed hundreds of his sexual partners to AIDS before his death in 1984.

In a case believed to be the first of its kind in the United States, a 27-year-old Army private is being court-martialed on charges of having unprotected sex with three soliders, allegedly none of whom he told of his positive test. Last month, an Army medical specialist was charged with a similar offense. And last week, a Bavarian court sentenced a 46-year-old former U.S. Army cook to two years in jail for trying to inflict "grievous bodily harm" by having unprotected intercourse with three men whom he did not tell he had AIDS.

Others believe that in general, the move to criminalize transmission of the virus is fundamentally flawed. "People have this idea that this sort of risk is a one-way affair," said John J. Martin, an assistant professor of public health and psychiatry at Columbia University who is conducting a long-term study of behavioral change among 750 gay men in New York City. In most cases, Martin said, "it's not. It's a two-way street and people are free to ask about sexual history, to insist on the use of condoms, or not to have sex."

The subject is extraordinarily sensitive in the gay community, whose leaders fear that it could spark an antigay backlash and increased discrimination. Many are concerned about suggestions by some politicians, including Sen. Jesse Helms (R-N.C.), that public health officials may need to exercise their quarantine powers, last used decades ago during outbreaks of contagious, easily transmitted diseases such as tuberculosis.

"I think it's helpful to the gay community for people to think that everyone's changed their behavior, but the fact is that people still go to bathhouses and to parks and don't tell their partners they're infected," said a veteran gay health counselor. "I'm not sure what the answer is, but I know it's not to just lock people up."

Some educators say that the belief that gay men are sufficiently well educated about AIDS is false. "A lot of health care workers assume that all gay men now know about and practice safe sex, which is far from true," said Bill Mannion, program director of the Immune Suppressed Unit at Hollywood Community Hospital in Los Angeles.

"Now it's almost harder to convince people than it was two years ago," said Mannion, who has extensive experience counseling gay men. "They say, 'I'm alive and nothing's happened and I feel fine, so why should I?' I can pass out brochures 'til I'm blue in the face, but if the message is not supported in bed where it counts, forget it."

Several recent studies document the persistence of risky behavior.

Columbia's Martin found that of the 750 men in his survey, 48 percent are still engaging in anal sex and 40 percent of the time they were not using condoms. A survey of gay men in Albuquerque published last summer in the Journal of the American Medical Association showed that 76 percent were practicing anal intercourse and that only 10 percent were using condoms more than 10 percent of the time. And a 1986 survey of gay men in Pittsburgh showed that more than 60 percent "never or hardly ever" wore condoms during anal sex. Most said they were not involved in monogamous relationships and 25 percent reported having sex with partners whose names they did not know.

"Some people have just missed the education," O'Donnell said. "Others think that 'safe sex' means having sex at home" while others "say, 'Well, I'm already infected, what does it matter?' "

That seems to be Macel's attitude. "I have sickle cell trait or I could get cancer or step out to get my car and get hit by a bus," he said. "I just try to go on with the basic realization that it could happen to me, but I feel it's healthy for me to just continue to go on" having sex.

Even those who are educated about safer sex practices sometimes resist making changes. "There's a tremendous difference between education and behavioral change," said Dr. Neil Schram, former chairman of the Los Angeles City-County AIDS Task Force. "Look at cigarette smoking or seat belt use or drunk driving. People are educated about the dangers of all those things; they just never think it will happen to them. The key word is denial."

The long delay between the time of infection and the development of symptoms poses additional problems. "It can take years to develop AIDS and in the meantime most people look and feel healthy," said Schram, an internist with a large AIDS practice. "It's not like being able to see the tangible result of your actions the next morning."

Although some men who discover they are infected decide to abstain from sexual contact, "nobody's pushing celibacy," according to Karen Pataky, a nurse practitioner who coordinates Whitman-Walker's network of support groups for persons with AIDS or those infected with the virus. "Nothing is risk-free except abstinence and that is simply not a viable option for most people. What we're pushing is safer rather than less safe practices."

Whitman-Walker medical director Dr. Peter Hawley projects that the Gay Men's VD Clinic will treat 3,000 men this year, a 50 percent decrease from 1982. One-third agree to be tested when they receive treatment, one-third have already been screened and another third refuse the test.

"Sometimes I'll ask, 'What can I do to get you to stop practicing unsafe sex? Do you think knowing your status would help?' " Hawley said. "Then I encourage people to be tested in the hope that it will make them act more responsibly."

O'Donnell said he and other counselors try to avoid appearing judgmental with repeaters, fearing it could cause them to avoid treatment. "We try to find out what the problem is, whether it's low self-esteem or no self-esteem or the desire to be wanted by another person, to be attractive," he said. "Other times people will say it's compulsive or impulsive behavior" and clinic staff refer them to a support group.

"There are clients I have seen three or more times in a year or people who come in to be tested eight or nine times," O'Donnell said. "I confront them when I suspect they're using a negative test to validate unsafe behavior. Sometimes I get tough and say, 'That's why they refurbished Ellis Island, to put people like you there.' "

A significant finding in a major San Francisco study was that men who knew someone with AIDS were more likely to change their behavior. Several Washington area AIDS patients say that might have made a difference to them.

"It was inconceivable to me that I might get AIDS," said a 35-year-old federal employe diagnosed last year. He has since stopped having sex with anyone other than his lover of nine years. "I was the first person I knew who got it. If I had known other people, it might have made a real difference."

Researchers and doctors agree that alcohol and drug use are often responsible for unsafe practices. "The biggest problem in condom failure is alcohol," said a researcher at the National Institutes of Health who is studying condoms. "People say, 'What the hell, just this once won't matter.' "

That rationalization has been a repeated problem for one young office worker who visited the Gay Men's VD Clinic last week for his seventh AIDS test in two years. Several of the tests have been administered as part of a long-term study in Baltimore.

"Sometimes I have several drinks and then alcohol or desire just takes over," said the man. Several days later, he said, he starts to worry. "Then I think, 'Oh, God, what have I done?' and I decide to get tested."

Although counselors say that virtually all infected people tell steady sex partners their test results, the decision about telling potential partners remains a subject of much discussion and debate in support groups and therapists' offices.

Some counselors say they think it is unethical not to disclose a positive test result before a sexual encounter. Others maintain that as long as safe sex practices are followed, there is no need to tell, since most gay men have decided not to take the test because they would rather not know if they are infected.

"My guess is that it's fairly common that people say, 'Well, I won't tell but I'll practice safe sex,' " said Bruce Voeller, a Los Angeles researcher who is considered an expert on gay sexual practices. "I think it's highly unethical not to give any sexual partner the choice. And any counselor or therapist who gives that {advice} is derelict."

Whitman-Walker's O'Donnell disagrees. "I personally don't recommend" that people tell potential partners, as long as they are practicing safe sex. "For many {infected} individuals, rejection is a big problem anyway."