Everyone warned me that the cardiac surgery ICU was one of the most physically and emotionally challenging rotations of the second year of medical residency.

They did not exaggerate. Many days I felt overwhelmed, and even numb. But what I remember most was an elderly woman whose kidney disease had destroyed her coronary arteries. She was barely surviving on an intra-aortic balloon pump, a device placed through an artery in her leg to reduce the strain on her heart.

Despite her suffering, she laughed loudly and often. She was the first person I checked on every morning and the last patient I said good night to each evening. She seemed always to be surrounded by members of her loving family, telling jokes and stories late into the night.

Still, it was painfully apparent that she was rapidly approaching the end of her life, and we had to have that tough conversation. How did she envision this chapter?

Not on the balloon pump, she told us firmly.

Her room was never silent, the device audibly laboring day and night. Because it was placed in her groin, she couldn’t sit up, eat her favorite foods, or even hold her loved ones. She wanted it removed.

“We want you to understand if the balloon pump comes out, there is a not-so-small chance your heart could arrest,” the attending physician told her quietly. She was silent for a moment, then nodded.

“OK, Jason will come by later and remove the pump.”

After a few hours, I mustered enough resolve to walk into her room. She greeted me with her usual smile. As I laid out the supplies, I explained to her exactly what I would do. It helped calm my nerves, and I hoped it calmed hers, too.

Finally, I told her I was ready. I looked up to find her in tears, and I reached out to hold her hand. She placed the other gently on my cheek.

“I’m so scared, Jason. I’m so scared.”

I told her that it was OK to be scared. She closed her eyes and nodded, telling me to proceed.

With a flick of a switch, the drumming sound of the balloon pump stopped. For the next hour, I held firm pressure to her groin to stop the bleeding.

Her heart would now have to pick up the extra work the machine had been performing. But none of us knew whether it had the reserve. I knew she might die at any moment, and the idea terrified me.

Then, suddenly, the heavy air was pierced by a transcendent melody. Her two sisters were playing gospel songs, ones they had grown up singing. Immediately, the tension faded from her face, and her body relaxed. She began to sing, at first quietly, but then with more passion. Her sisters joined in, surrounding us with the warmth of their voices. The three women looked at each other and laughed.

For an hour, they continued singing. Then they prayed. They prayed for her heart. They prayed for her soul. They prayed for those whom she had touched, and who touched her. They prayed for her doctors and nurses. They prayed for my hands that were controlling her bleeding.

For the first time in my life, I, too, closed my eyes and prayed. I prayed for her to continue to be at peace for the remainder of her life.

Then I gently lifted my hands and placed a clean dressing. Within a few days, she was gone.

Jason Han is a resident in cardiothoracic surgery in the Perelman School of Medicine at the University of Pennsylvania. The opinions expressed in this article do not represent those of the University of Pennsylvania Health System or the Perelman School of Medicine.