At age 86, my father had survived both colon cancer and a stroke that left him with aphasia. His mind was sharp, though, and he wasn’t depressed. A crack bridge player with a passion for Italian restaurants, he was popular at his assisted living facility even though he couldn’t speak much. He told me he’d lived a good life and wasn’t afraid of dying, and he didn’t want to go through any more medical trauma. No chemo, no radiation, no surgeries, no treatment.

His advance directive read DNR and DNI — do not resuscitate, do not intubate. No one would break his ribs doing CPR or make bruises bloom along his arms trying to find a vein. As his health-care proxy, I was completely on board. I’d read Sherwin Nuland’s “How We Die,” Atul Gawande’s “Being Mortal,” Elisabeth Kubler-Ross’s “On Death and Dying.” Comfort would be the priority and any pain would be “managed,” which I assumed meant erased.

Up to 80 percent of Americans die in hospitals or nursing homes, and a third spend at least 10 days in an intensive care unit before they die, many of them comatose or on a ventilator. A week after his sudden diagnosis of widespread metastatic disease, my father was lucky enough to get a bed in our town’s only hospice, a homey facility staffed with attentive and experienced caregivers. The alternative would have been a hospital bed in my living room, so it was a relief to know that my father was in the hands of professionals. They would know what to do.

And they did. The nurses and caregivers were gentle as they repositioned my father in bed, explaining each move even when it seemed he couldn’t hear or follow. When he could no longer swallow they squirted morphine into his cheek and rubbed it so the medicine would be absorbed. “This will make you feel better,” they would say, and my father would turn his head and open his chapped lips like a baby bird.

But his death was not the peaceful drifting away I’d always imagined, where you floated into a calm, morphine-induced sleep, your breath came slower and slower and then simply stopped. He vomited blood over and over. A lifelong stoic who never complained of pain — even when he’d broken a hip the year before — he twitched restlessly in bed, eyes closed, his brow furrowed and his skin clammy.

The magical “managing” of pain and nausea I’d anticipated turned out to be more aspirational than real. The hospice nurse prescribed one anti-nausea medication, then another, without success. Eventually, Ativan and Haldol settled the nausea, and morphine helped the pain. My father was lucky it helped; about 25 percent of people die in pain. One caregiver confided to me, “There are people whose pain we never get under control.”

For days we watched my father’s cheeks hollow, watched him pluck at the thin blanket that was all he could bear on his body. His kind brown eyes glazed over, and some trick of the light made them look blue under his half-closed lids. Sometimes he sat up suddenly, reaching forward, and then fell back on the pillows. I knew there was a name for this behavior, terminal restlessness, that it’s common during the dying process. I knew the gurgling sounds he made as he breathed came from his body’s inability to clear secretions, and that — according to hospice — it probably wasn’t uncomfortable for him.

Leaving the hospice facility one night, I told my 81-year-old aunt that I wished I had the nerve to put a pillow over his face. “I’ll stand guard at the door while you do,” she replied. Dying is hard work. And it’s hard to watch.

On the last night, I sat with my father until the summer sky began to darken. Then I gathered my belongings and leaned over the bed where he lay unresponsive, his eyes closed, his mouth half-open. I kissed his stubbled cheek. “Dad, I’m going now,” I told him. “It’s time for you to go too.” He died a few hours later. He was alone, as most people are when they die, so I don’t know if it was peaceful, if he made a sound or opened his eyes or just stopped breathing.

After he died, I was haunted by scenes of his suffering. I remembered looking out a hospital window nearly 30 years earlier with my newborn daughter in my arms, realizing that every one of the people I saw on the street had been born. For every person walking down Seventh Avenue, a woman had borne pain that tore her body open. It was a horrifying thought.

Drugs help with the pain of childbirth, but they can’t take it away completely. It’s the same with dying.

“Suffering is an ineradicable part of life, [like] fate and death,” wrote psychologist Viktor E. Frankl in his bestseller “Man’s Search for Meaning.” He was something of an expert, having survived nearly three years in a variety of Nazi camps.

Of course, my father’s suffering was nothing like the kind Frankl witnessed. But still, death, like birth, is a creaturely process, a force that wrenches us onward without consulting our preferences or respecting our sensibilities.

In the weeks after my father’s death, I began to understand in a deeper way the meaning of a good death. No drugs took away all my father’s physical pain and nausea. But in the care he was given, the morphine, the quiet words, the repositioning and cool cloths on his forehead, his suffering was addressed even if it couldn’t be “managed.”

And that, I think, is what we all want. Not just freedom from beeping machines and needles and the cold lighting of an ICU, though that matters, too. Not just the absence of pain, which isn’t possible for everyone. But the solace of being seen and heard and acknowledged brings comfort even in the face of deep suffering.

I hope it’s something we can remember as we move toward a society where more of us can have a truly good death.

Harriet Brown’s latest book is “Shadow Daughter: A Memoir of Estrangement.” She is a professor of magazine, news and digital journalism at the S.I. Newhouse School of Public Communications in Syracuse, New York.