Soon after John O’Malley began working as a hospice nurse he was checking on a patient who told him he thought it was time. The man’s family wasn’t there, so O’Malley pulled up a chair, joined him in a prayer and kept hold of his hand until he died.

“He wasn’t alone, and what a privilege it was that I was the one there,” said O’Malley. “I knew I was where I belonged.”

Hospice care is about providing comfort at the end of life, and O’Malley knows that what he does helps ease the suffering of his patients and the burdens of their families. It wasn’t that long ago that he was on the receiving end of that comfort and support when his wife was in the end stages of cancer. The nurses at Gilchrist Hospice Care’s Towson, Md., inpatient center not only attended to her physical and emotional needs, they cared for him and helped him prepare for her dying.

He was so impressed and inspired by the experience that he began taking classes to become a nurse two months after his wife died in late 2010.

Five years later, O’Malley is dispensing the same compassionate care to dying patients and their families that he received; easing pains both literal and figurative, transforming death from a dark and frightening experience into a peaceful and sometimes even spiritual one.

Many people like O’Malley have been moved by the illness of friends or family to make nursing a career, and many do it as a late or second career, say observers and administrators in the profession. Even so, O’Malley stands out. At 66, he’s been on the job less than two years.

O’Malley had a decades-long career as a high-ranking federal immigration official and retired a year after his wife was diagnosed with cancer in 2005. When she died he told his three grown children that he planned to return to school.

He already had a bachelor’s degree in biology from Fordham University in New York, and had made it most of the way through a doctorate when the pressures of family life led him to take his government job in immigration for a steady paycheck. Retired and with no particular hobbies, he went back to school in early 2011 at Howard County Community College, where seniors attend classes for free. He began a year and a half of prerequisites and then entered a two-year nursing program. He never wanted to work anywhere but at Gilchrist, where his wife, also a nurse, spent her last days.

A tall, robust man with a thatch of curly silver hair, O’Malley said he found course work a bit easier the second time around, and after working as a nursing aide at Gilchrist’s smaller hospice in Columbia while still a student, he landed a job when another nurse retired.

National statistics on the number of people who have followed similar career paths and become nurses later in life are tough to come by. Available data suggest it’s out of the ordinary.

In California, for example, fewer than 1 percent of nursing graduates in the 2013-2014 graduating year were 61 and older, according to a study by Joanne Spetz, director of research strategy in the University of California, San Francisco’s Center for Health Professions.

The average age of nurses nationally is 50, according to the 2013 National Workforce Survey of RNs conducted by the National Council of State Boards of Nursing and the Forum of State Nursing Workforce Centers. The average age at graduation has remained steady for years at about 31, but the workforce as a whole aged as nurses worked longer and younger women, who still dominate the field, chose other professions, said Christine Kovner, professor of geriatric nursing in New York University’s College of Nursing.

Kovner spent years studying the nursing profession and said the decline began reversing slightly in the last five years as the recession made some students reconsider nursing as a stable profession. Flexible work hours and meaningful work also have drawn people back to nursing, she said.

Many turn to nursing after having worked as home health aides or in related positions, she said. Often men, who still make up just 10 percent of the workforce, become nurses after first working as police officers, emergency medical technicians or military medics.

“He’s still unusual,” Kovner said of O’Malley, given his age, successful government career and personal experience with hospice. “Not unheard of, but unusual.”

Until recently, Gilchrist employed another nurse who entered the field after her spouse died in hospice. She was in her 50s.

Kerry Avant, clinical manager at Gilchrist’s Howard center, said nurses there tend to be in the 30s, 40s and 50s, and they all feel some kind of “calling” to hospice care because of a personal or professional experience. She typically doesn’t hire nurses directly from nursing school, rather she prefers them to get a bit of technical experience in a hospital first before choosing a specialty.

O’Malley brought certain traits to the table, such as his commitment to hospice care and his life experiences. His age wasn’t a factor.

“It’s important to know how to start an IV, but it’s also important to know while starting an IV how to make someone comfortable,” she said. “That’s just who John is. It’s how all the hospice nurses are. That’s not to say John isn’t unique. We’re lucky to have him.”

Richard Gottal agrees. He’s been a patient of O’Malley’s since Nov. 24, when he was sent to Gilchrist from the hospital that treated his cancer.

“He got along well with everyone at the hospital but he’s more comfortable here because his pain is managed better here,” said Pat Gottal, Richard’s sister, who has shared their family home in Pigtown with him since their birth. “He really likes it here. He thinks the world of John.”

She said O’Malley spends time talking to her brother about New York and their common Irish heritage. Even Sweetie Pie, the Gottals’ loyal Maltese, who spends her days curled up in the hospice bed, is warming up to O’Malley.

Richard Gottal called O’Malley an “excellent” nurse, and said it’s a “shame he can’t be on for 24 hours.”

O’Malley said sometimes it’s tempting to stay past his shift. He normally works three 12-hour shifts a week, and has a short commute from his home in Ellicott City, Md.

He said becoming a nurse was always in the back of his mind, perhaps because he was married to one for 38 years. The Brooklyn, N.Y., native also briefly worked as a politician and a cab driver.

So far, he’s not regretted abandoning retirement - even on his first day at Gilchrist, when he went to visit his first patient and felt no pulse. He thought he’d done something wrong, and then he realized the patient had died. On Day 1, he was faced with telling a family of a loved one’s death.

His goal is to make everyone in the room feel more comfortable, even patients who are only briefly there.

O’Malley said he usually doesn’t volunteer that his wife died at Gilchrist’s center in Towson, but he said if they need to know, “I can tell them how comfortable the reclining chair is because I’ve slept in it.”

When he leaves the job for the day, he said he always feels like he did something good.

When the time comes to leave the job for good, he said, “it’ll be because they have a bed here for me.”