A new study offers a glint of hope to people in a desperate situation: Patients with melanoma, the most serious form of skin cancer, that has spread to the brain.

A combination of two drugs that activate the immune system shrank brain tumors in many melanoma patients and prolonged life in a study of 94 people at 28 medical centers in the United States. The drugs were ipilimumab (brand name Yervoy) and nivolumab (Opdivo), and they belong to a class called checkpoint inhibitors.

Melanoma is more likely than most cancers to spread to the brain, and once it gets there, fewer than 20 percent of patients survive one year with traditional treatments, according to Dr. Hussein A. Tawbi, the first author of the study and an associate professor of melanoma medical oncology at the MD Anderson Cancer Center in Houston.

But in the study, 82 percent were still alive after a year.

“This is great news,” Dr. Tawbi said. “We can help a lot more melanoma patients, and hopefully we’ll be able to help a lot more patients in general with these results.”