Terminally ill cancer patients who drew comfort from religion were far more likely to seek aggressive, life-prolonging care in the week before they died than were less religious patients and far more likely to want doctors to do everything possible to keep them alive, a study has found.

The patients who were devout were three times as likely as less religious ones to be put on a mechanical ventilator to maintain breathing during the last week of life, and they were less likely to do any advance care planning, like signing a do-not-resuscitate order, preparing a living will or creating a health care proxy, the analysis found.

The study is to be published Wednesday in The Journal of the American Medical Association.

“People think that spiritual patients are more likely to say their lives are in God’s hands  ’Let what happens happen’  but in fact we know they want more aggressive care,” said Holly G. Prigerson, the study’s senior author and director of the Center for Psychosocial Oncology and Palliative Care Research at the Dana-Farber Cancer Institute in Boston.

“To religious people, life is sacred and sanctified,” Dr. Prigerson said, “and there’s a sense they feel it’s their duty and obligation to stay alive as long as possible.”