The Food and Drug Administration on Thursday approved the first treatment that uses a so-called cancer vaccine, a drug that trains the body’s own immune system to fight the disease.

The drug, Provenge, developed by the Dendreon Corporation, was approved to treat advanced prostate cancer. In clinical trials it extended the lives of patients about four months compared with a placebo.

Getting the immune system to attack cancer has tantalized scientists for decades, because it promises to have fewer side effects than the harsh chemotherapy now used. But until now the approach has yielded little but disappointment.

“The big story here is that this is the first proof of principle and proof that immunotherapy works in general in cancer, which I think is a huge observation,” said Dr. Philip Kantoff, chief of solid tumor oncology at the Dana-Farber Cancer Institute in Boston and the lead investigator in Dendreon’s largest clinical trial for the drug. ”