Home is now the most common place people are choosing to spend their final days of life, outpacing hospital deaths for the first time in more than half a century, according to a study published Wednesday in the New England Journal of Medicine.

The findings are reflective of an end-of-life trend that's been growing since the early 2000s.

From 2003 to 2017, the percentage of people dying at home increased from 23.8 percent to 30.7 percent, researchers found. At the same time, deaths that occurred in hospitals fell from 39.7 percent in 2003, to 29.8 percent in 2017. The research is based on an analysis of federal death certificate data from natural deaths during that time period.

The flip-flop may be attributed in part to growth in home hospice care, which is covered by Medicare, said study co-author Dr. Haider Warraich, associate director of the heart failure program at the VA Boston Healthcare System. Hospice provides pain management, along with emotional support and care to terminally ill patients nearing the end of their lives, as well as their families.

The number of Medicare beneficiaries receiving hospice care has steadily grown over the past decade. The National Hospice and Palliative Care Organization reports there were 1.49 million such recipients in 2017, a 4.5 percent increase from the year before.

But the rise in at-home deaths also "reflects that perhaps we're able to honor more people's wishes and help them pass away in a place that's most familiar to them," said Warraich, who is also a cardiologist at Brigham and Women's Hospital and an instructor in cardiology at Harvard Medical School.

Dying at home was less common among younger patients, the study found. That's likely because of two reasons: young people in life-threatening situations are more likely to undergo emergency medical interventions in a hospital, and insurance other than Medicare may not cover hospice care.

Racial minorities were also less likely to die at home, perhaps because of either health care access disparities or cultural preferences. Women, too, had lower odds of a home death, as they tend to be more likely than men to fill the caregiver role.

Why choose home?

Dying at home may be preferred because of "the degree of control that you and your family have over how things are going to happen," said Harleah Buck, an associate professor in the College of Nursing at the University of South Florida.

Buck, who wasn't involved with the new study, said that people have a variety of cultural and spiritual needs related to death, often involving large gatherings of family members. "As soon as you step into a hospital, you lose the ability to pack 30 people into a room," Buck said. Many hospitals also have strict limits on young children and beloved pets as visitors.

But the rise in at-home deaths "also raises important questions about how well are we supporting not only those patients, but the caregivers who are now responsible for taking care of these patients," Warraich said.

A home death can be extraordinarily difficult for family members who are thrust into unfamiliar health care roles. "You're handing off the primary responsibility for the daily care of the patient from the medical system to the patient themselves and/or their informal caregivers," he said.

Patients at the end of life often have pain and shortness of breath — two potentially upsetting experiences for loved ones to witness and treat.

Family members often feel "a sense of obligation" to take care of their loved ones," said Sharon Kozachik, an associate professor at the Johns Hopkins School of Nursing.

"Sometimes we ask family members to do medical tasks of care that we don't allow students to do without someone at their elbow," Kozachik said, "and it can be frightening and hard on families."

Kozachik and Buck said that's when hospice care can step in to assist in comforting patients, as well as caregivers.

"It's really important that people be able to die the way they want to in the environment where they would like, with the people and belongings that they cherish," Kozachik said.

Follow NBC HEALTH on Twitter & Facebook.