Matthew O’Reilly is an emergency medical technician in New York. He knows what it’s like to be asked by a patient, “Am I dying?” — and what to do when the answer is, “Yes.”

A cruel consequence of being alive and aware is the ability to understand that someday it all must end. While death may be inevitable, it isn’t something most of us like to think about, except as a far-off event, peacefully drifting away in bed surrounded by loved ones.

But that isn’t the end that everyone gets. And at the front line of every sudden fatal illness or deadly accident, often, is a medical professional — the doctor by the beeping hospital bed, the first responder at the scene of a crash. These women and men are faced with the difficult job of telling a patient that they will soon die. Not might. But will. How do they know when to disclose such a thing? How do they know how to act?

Matthew O’Reilly [TED Talk: “Am I dying?” The honest answer] is a veteran emergency medical technician (EMT) in Suffolk County on Long Island, New York. In his talk, he describes what it’s like to be asked by a patient “Am I dying?” and to answer honestly.

A call to the scene of a motorcycle accident changed him. When the dying man asked for a straight answer, O’Reilly told him the truth.

O’Reilly started his career as an EMT around 2006. He was a volunteer firefighter at the time, and at the scene of a crash he watched a medic — despite a threat to that medic’s own safety — crawl under a rolled car to save a man’s life. The act left an impression on O’Reilly and led him to specialized training as a critical-care EMT, with an extra level of medical knowledge for victims of emergencies, accidents and fires.

How does an EMT know if a person is going to die? Although O’Reilly’s formal training taught him how to be a clinician and how to treat a patient’s injuries, experience also plays a role in knowing when a person’s death is imminent. It’s not a set formula, he says, but a combination of factors: the extent of the injuries, changes in blood pressure and other vital signs, and years of experience with what dying looks like — as well as the time it will take to get to the nearest hospital. Sometimes the distance is simply is too far for a weakening body.

Still, for his first two years on the job, he told patients they were going to make it, even if he knew they would likely die. “I was always afraid to tell a person yes, you are probably going to die,” he says, “because I was afraid that they would go into a panic and just break down in front of me.”

The experience always left O’Reilly with the feeling that he had lied.

Perhaps, he thought, those people would want to know their fate, to give them time to pray or make peace or send a message to a loved one — whatever was most meaningful to them in their last moments.

Around two years into the job, a call to the scene of a motorcycle accident changed him. A dying man asked him for a straight answer. O’Reilly told him the truth. The man did not react as O’Reilly had feared, but instead appeared calm and at peace — almost relieved.

Since then, O’Reilly has always answered truthfully. And, he says, each patient he levels with reacts in the same way — growing at ease with dying, drawing a peaceful last breath even in this entirely unanticipated situation.

Rescuers aren’t trained for how to interact with a soon-to-die patient. Why not?

Knowing how to interact with a soon-to-die patient isn’t something that EMTs are trained for, says O’Reilly. He had to learn on the job, by observing colleagues and relying on his own sense of empathy. It isn’t common for first responders to talk openly about their interactions with dying patients, but, says O’Reilly, it’s vital: “I feel that people want to know. It’s one of those questions that you don’t know the answer to until you’re there: What’s going to happen when I die? What’s going to happen when I’m in that situation?” he says. “Unfortunately, I’ve seen the steps prior to death, and hopefully giving this TED Talk can give people comfort knowing that it’s not going to be that bad.”