Former president Jimmy Carter began his 10 a.m. Sunday school classes as he so often does: with a short update on his health. He stood before 300-some people — a mix of those who had traveled from down the street and across the country — and told them that he had visited his doctors this past week. Only this time, he came away with some good news.

“They didn’t find any cancer at all,” Carter said Sunday.

The startled crowd broke into applause.

“Good God,” one person said, according to video of the event from NBC.

“So a lot of people prayed for me,” Carter continued, calmly, “and I appreciate that.”

Carter’s announcement came four months after he had disclosed a daunting diagnosis: a form of melanoma that had spread across parts of his brain and that only a decade earlier would have qualified as a near-certain death sentence. But in this case, a combination of radiation treatments and a new immune-based therapy have raised the odds of survival, according to doctors and medical experts.

“We were very, very surprised,” said Jill Stuckey, who is a member of Maranatha Baptist Church in Plains, Ga., where Carter has taught Sunday school for decades. “This was just wonderful news out of the blue.”

Carter, 91, had a small cancerous mass removed from his liver on Aug. 12, and shortly afterward, doctors found four spots of melanoma on his brain. He has been in treatment since then and has been receiving a newly approved drug aimed at helping the immune system recognize and fight cancer cells.

The treatment is so new that it’s hard to predict “how durable” Carter’s response is going to be, said Louise Perkins, chief science officer for the Melanoma Research Alliance, the largest private funder of melanoma research. But Carter’s apparent response to the drug isn’t unheard of.

“We do see these so-called ‘complete responses’ where there is no evidence of the disease. Complete responses are really good news,” Perkins said. “We don’t know how long these kinds of responses might last.”

A short statement posted Sunday afternoon on the Carter Center website quoted the former president as saying: “My most recent MRI brain scan did not reveal any signs of the original cancer spots nor any new ones.” He said he would continue to receive regular treatments for the disease.

Since the diagnosis, Carter’s fans have been making pilgrimages from across the country to see him teach. His first lesson after his cancer announcement drew nearly 1,000 people who crammed into a church built for a few hundred; people slept in their cars as they waited overnight for limited first-come, first-served seats.

The crowds have since calmed, but on Sunday, people could be found from Wisconsin, Australia and South Korea, said Boze Godwin, the mayor of Plains, who was at church with Carter and has known him for decades.

“I had talked to him recently, and he had told us this new therapy was working really well,” Godwin said. “So I was very happy to hear that. But then to hear him say this morning that it was gone — that caught us all very flat-footed. He didn’t even make a big deal of it. He just said it at the beginning of class.”

Carter was the 39th president and served from 1977 to 1981. His humanitarian and human rights work in the years since helped earn him the Nobel Peace Prize in 2002.

In August, Carter mentioned that he had begun to receive pembrolizumab, better known as Keytruda, which was approved last year by the Food and Drug Administration for patients with advanced melanoma who have exhausted other therapies. The FDA said the drug represented a substantial improvement over existing treatments.

Cancer cells have a striking ability to disguise themselves from the human immune system, which aids their spread. Immune therapies work by essentially pulling back that cloak of invisibility, allowing the body to recognize and attack cancer as it would any other harmful invader. Keytruda, manufactured by Merck, is designed to block a cellular pathway known as PD-1, which hinders the immune system’s ability to attack melanoma cells.

Therapies such as the one Carter is receiving have transformed the treatment — and the outlook — for some cancer patients over the past few years. They quickly have become a cornerstone in the treatment of certain cancers, in addition to long-standing approaches such as surgery, radiation and chemotherapy.

The new therapies tend to be expensive — costing as much as $150,000 a year, but they have shown remarkable results in some patients. Dozens of studies are underway in hopes of expanding the treatments for broader use in a range of cancers, including bladder cancer, breast cancer and Hodgkin’s lymphoma. Earlier this fall, for example, the FDA approved the use of pembrolizumab in some patients with advanced lung cancer who had tried other treatments.

More than perhaps any other cancer, melanoma has been transformed by the advent of immunotherapy treatments. The FDA has approved nearly a dozen therapies for the disease since 2011, half of them aimed at using the body’s immune system to recognize and wipe out the cancer, said Perkins of the Melanoma Research Alliance.

While only a portion of melanoma patients have responded to any of the treatments, those who do often have shown dramatic, long-lasting responses.The long odds against recovery from a metastic melanoma began to change in 2011 with the approval of ipilimumab, the first immune-based therapy for the disease. Perkins said that one in five patients treated with that drug, dating back to clinical trials, was alive many years later. “One of those numbers that’s amazing and heartbreakingly small at the same time,” she said.

Antoni Ribas, a researcher at UCLA and the lead investigator of a crucial clinical trial of Keytruda, said in an interview Sunday that he was glad to hear of Carter’s apparent response but not surprised. He said that although only about a third of patients with malignant melanoma tend to respond to the treatment, older patients who tend to have melanoma that has many mutations and is related to chronic sun exposure “tend to be the ones who do best.”

In that sense, he said, Carter’s age might have worked in his favor.

“The reason is because the immune system has to focus on something that’s different in the melanoma from the normal cells,” said Ribas, who is not familiar with the specifics of Carter’s case. “The more mutations, the more likely the immune system will figure out there’s something different that needs to be attacked.”

Soon came a wave of other immunotherapies for melanoma, including the drug Carter is receiving, which was approved in September 2014. With each of the new generation of drugs, doctors have seen some cases of startling results, in which advanced cancers all but vanish. It doesn’t happen in most patients, but it happens.

The American Cancer Society estimates that more than 73,000 Americans will be diagnosed with melanoma in the coming year, the majority of cases in men. Nearly 10,000 people in the United States are expected to die from the disease during the same period.

“From the very beginning [of this], I’ve said that in any battle between cancer and Carter’s brain, Carter’s brain will win,” said Gerald Rafshoon, who has known the former president for half a century and served as his White House communications director. “I’ve been up against that brain. It’s a tough opponent.”

David Weigel and Michelle Boorstein contributed to this report.