More than most people, James N. Martek will be thankful to turn 55 at the end of this month. He almost didn’t make it.

The basketball referee from Lancaster collapsed on the court in the first quarter of last Friday’s varsity game between Mount Mercy Academy and Christian Central Academy.

“To tell you the truth, I don’t remember anything from maybe a half-hour before the game,” he said. “The last thing I remember is walking into the locker room to get dressed, and then the next thing was waking up upstairs in ICU.”

Martek’s heart had stopped on the court.

Fortunately for him, Melissa M. Hudecki, an athletic trainer, was working at the game. She ran to midcourt, performed CPR and administered the automatic electronic defibrillator until firefighters arrived, saving his life.

The two embraced Thursday when they were reunited in Mercy Hospital, where Martek had an automated defibrillator implanted Tuesday.

“If it wasn’t for you, I wouldn’t be here. This is special,” he told her. “I’ve got tears in my eyes.”

“It’s so good to see you up and around,” said Hudecki, who works for Catholic Health AthletiCare.

The two have seen each other at athletic contests for about 10 years.

Martek, who is a risk manager for HSBC Mortgage Co. by day, also referees football and lacrosse. He said he remembers when Hudecki, now 37, was the scorekeeper for the St. Joseph’s Collegiate Institute lacrosse team.

“When I heard that was you, I said, ‘She’s my angel of mercy,’ and my family is just so happy,” Martek said.

A graduate of Canisius College, Hudecki was uncomfortable with the attention Thursday. “I was just doing my job,” she said.

Others noted how important that job is.

“The timeliness when you did it is important; the responding as quickly as you did, is what I believe, saved his life,” said Kelly A. Finkowski, manager of AthletiCare sports program..

“When you delay care, the outcomes aren’t the same.”

Both of them then repeated the CPR mantra: Every minute lost decreases the chances of success by 10 percent.

Dr. Robbie D. Wall, a cardiologist who treated Martek in Mercy Hospital’s Catholic Health Heart Center, agreed that time was vital in the case of Martek, who suffered from an arrhythmia.

“It’s quite remarkable to see how well Mr. Martek is doing, considering what he has been through. The early resuscitation he received from Melissa, as well as the firefighters, really saved his life,” he said. “We know that the death rate associated with what Mr. Martek had is very high. Only less than 5 percent of people actually live.”

Martek was put into a medically induced coma through the weekend to decrease the amount of oxygen his body needed and to stabilize his condition.

The incident has changed his life. He said he has been a referee the last 20 years and often was assigned to games four or five evenings a week. The crisis, he said, has made him reassess his life.

“I’ve been married 30 years. My wife has sacrificed the last 20 years,” he said. “Friday could have been my last day with her. I’ve got 30 years in. I’d love to have another 30 years with her. More than likely, that is the last game I’m going to ref.”

He does hope to return to the basketball court, however.

“What I’d really like to do,” he said, “is apologize to all of the players for scaring the hell out of them.”