In explicit guidelines released yesterday, an ethics committee of the American Medical Association informed the nation's doctors that they cannot refuse to treat people infected with the AIDS virus.

The Council on Ethical and Judicial Affairs, which rules on issues of medical ethics for the AMA's 280,000 members, also said doctors who may be infected with the AIDS virus should refrain from activity "that creates a risk of transmission of the disease to others."

The recommendations, the first ethical guidelines released by the AMA in response to a single disease, state that all patients "afflicted with AIDS need competent, compassionate treatment."

Over the past several months, there has been a growing debate within the medical community about the moral obligation to treat AIDS patients, although there have been few documented cases of physicians refusing to do so.

At its annual meeting last summer, AMA officials debated the subject and reminded members that all doctors are obliged to treat the sick.

"AIDS presents a special problem. And it is a problem that is likely to grow," said Kirk Johnson, the AMA's general counsel. "It is important for us to make sure we reaffirm the basic guidelines of ethical behavior at a time of national crisis about a horrible disease."

The council is an independent board within the AMA that has the authority to interpret the principles of medical ethics for its members. The AMA has no legal ability to enforce these guidelines, but it is by far the largest and most influential of American medical organizations. And its ethical guidelines are used as a standard.

The council also said patients are "entitled to expect that their physicians will not increase their exposure to the risk of contracting an infectious disease, even minimally."

If that opinion is followed, it would effectively prevent surgeons infected with the AIDS virus from operating because there is always a risk that they could infect a patient during an operation.

There have been few surgeons known to have been infected with the AIDS virus. But hospital officials throughout the country have had to decide how to assure surgical patients that they won't be exposed to the virus.

"There has been a great deal of confusion about what surgeons should and should not do," said Dr. Nancy Dickey, a member of the council. "This makes it clear. If there is a chance you can pass on the virus, you have no place operating on a patient."

In addition, the AMA council urged physicians to report to public health authorities the names of infected patients "who refuse to refrain from activities that might result in further transmission of the disease."

The council stated, however, that a doctor should first attempt to persuade infected patients to stop endangering others and notify public officials only if that fails.

If the authorities were then to take no action to stop the infected person, the ethics council suggests that doctors themselves inform third parties that they are in danger of infection.

Although few doctors have refused to treat AIDS patients, a growing number have expressed concern that they could contract the disease by treating their patients.

AIDS is spread by exchanging blood or bodily fluids, almost always during sexual intercourse or intravenous drug abuse.

Several health-care workers, however, out of the thousands who treat AIDS patients every day, have been infected by accidentally sticking themselves with infected needles or by having large amounts of infected blood splashed on open cuts.

"We all have families and we can empathize with a young resident saying I don't want to put myself at risk of contracting this disease," Dickey said. "On the other hand, there is a clear right and a clear wrong here. Nobody makes us become physicians, we ask for the job."