The Centers for Disease Control and Prevention reported that nearly all Americans hospitalized for monkeypox had weakened immune systems.

Almost all of the hospitalized patients had H.I.V., and more than two-thirds of them were black.

Although most cases of monkeypox are mild, doctors should test patients with suspected cases for H.I.V., and be prepared to offer prompt treatment for both.

Dr. Jonathan Mermin said that monkeypox and H.I.V. have caused tragic effects.

Treatment for some patients was delayed as long as four weeks after they were first seen in the study.

More than 76,000 cases of monkeypox have been reported around the world as of Tuesday. According to the C.D.C., a majority of men have sex with men.

There has been a decline in the number of new infections. There has been a decrease in the number of high risk people opting for vaccine. Seven percent of vaccine doses have gone to recipients who are black.

People living with H.I.V. and other conditions that weaken the immune system were less likely to get monkeypox in Africa.

C.D.C. scientists analyzed case reports from 57 patients who were hospitalized for monkeypox between August 10 and October 10. The majority of the patients were males.

Most of them had skin eruptions in the mouth, rectum, and vagina. One in five people had symptoms in their lungs and eyes, and four people had symptoms in the brain and spine.

Four of the 47 patients with H.I.V. had taken drugs to suppress the virus before they were diagnosed with monkeypox. A CD4 count of less than 50 is a sign that the immune system is weak.

Two of the patients, one of whom had H.I.V., were being treated for cancer, and three were solid organ transplant recipients. The immune system is weakened by these conditions.

More than one third of the patients were admitted to intensive care. Five of the 12 deaths were caused by monkeypox infections and six are under investigation.