Terminally ill cancer patients had a better quality of life when they could die at home and avoid intense life-prolonging measures, a new study finds.

Nearly 400 cancer patients were asked about their treatment preferences and support structures, along with socio-demographic factors. After their loved ones’ deaths, caregivers were interviewed and asked about the location of the death, physical and psychological distress and treatment of the patient.

Those who had positive experiences tended to have died at home, had pastoral care, and had a “therapeutic alliance with the physician.”

Chemotherapy, feeding tube positioning, and high degrees of anxiety and depression contributed to negative feelings, researchers said. The feelings are something that sometimes can be modified by healthcare workers, researchers noted.

Caregivers and physicians who remain engaged and “present” with dying patients “by inviting and answering questions and by treating patients in a way that makes them feel that they matter as fellow human beings — have the capacity to improve a dying patient’s [quality of life],” researcher Holly G. Prigerson, Ph.D., said.

The study was published online in the Archives of Internal Medicine. The study received support from the National Institute of Mental Health, the National Cancer Institute, and Dana-Farber Cancer Institute.