Runner performed life-saving CPR during half-marathon. Then he finished the race and did it again.

The biggest concern for Dr. Steve Lome before starting the Monterey Bay Half Marathon along the California coast last month was being able to keep up with his teenage kids beside him.

But the cardiologist would soon face a life-or-death situation around mile 3 of the 13.1 mile race.

"Somebody right in front of me collapsed," Lome said. "I saw him go down and it was pretty clear to me that it was not just somebody who tripped and fell or somebody who fainted. It was a very sudden collapse."

The man on the ground was 67-year-old Gregory Gonzales, a Washington state Superior Court judge. Gonzales said he felt fine even in the moments right before. He'd trained for the race and was so at ease that day, his only worry was nabbing a good parking spot.

"I believe we went up an incline," said Gonzales. "I thought to myself, 'Oh my gosh, it's downhill for a little bit, great!' That's all I remember."

Lome says Gonzales hit his head on the pavement when he fell. Lome rushed over and started CPR with the help of a few passersby.

"The biggest concern is that, having no blood flow to the brain, you can get some permanent brain injury," said Lome. "That's what we want to avoid at all costs."

He estimates they were doing chest compressions for maybe six minutes when Gonzales was defibrillated. Gonzales says he woke up in the ambulance like nothing had happened, except for soreness in his ribs. He was told it was from the prolonged CPR.

"I'm glad I have those chest fractures," said Gonzales. "I'll take anything because that saved me."

Once the ambulance left, Lome was a little rattled but decided to continue the race. He had lost about 15 minutes and could make some of it back, even if his kids were farther ahead by now.

He got on his cellphone, alternating between running and walking, just to make sure the hospital where Gonzales was headed knew what had taken place at the scene. He says that can make a difference to a patient's care.

He eventually made it past the finish line and threw his hands up in the air to celebrate the accomplishment, but the joy was short-lived.

"I heard somebody say, 'We need some help over here,'" Lome recalled. "Another person was down, had a head wound and was completely unresponsive. No pulse. No breathing."

Michael Heilemann, the 56-year-old runner on the ground, said he started to feel dizzy about 10 steps after the finish line.

Watch the video above to see photos from the finish line showing Dr. Lome rushing to Michael Heilemann's aid.

"I grabbed onto the rail and I was like, 'Oh man, I must have pushed a little too hard,'" said Heilemann.

That's the last he remembers of the event.

Once again, Lome was doing CPR. He says during his 12-year career, he's seen hundreds of cardiac arrests. But they've always been in the hospital, with medical staff around him. He's never had to use his CPR training outside his shift, let alone twice in one day.

Instances of heart attacks at half-marathons and marathons are rare. A 2012 study found that out of 10.2 million runners in the U.S. between 2000 and 2010, 59 experienced cardiac arrests during a race.

What's also rare, though, is survival if it happens: 71% didn't make it.

Heilemann, who lives in San Anselmo, California, calls it "super crazy fortuitous" that Lome happened to be right behind him when he hit the ground. He remembers seeing the ambulance that carried Gonzales away near the beginning of the race and later realized that because of Gonzales's cardiac arrest, Lome was delayed.

"Otherwise, Dr. Lome would've been way ahead of me," Heilemann said.

Both Heilemann and Gonzales experienced blockages which led to the cardiac arrests and got stents in their coronary arteries to improve blood flow. Lome says he hopes it encourages other people to pay closer attention to their own heart health. And to learn CPR.

Lome went to visit both men in the hospital the following day. He asked Heilemann if he had received a medal for the race. When Heilemann said no, Lome gave one to him.

"I didn't know at the time that it was his medal," Heilemann said. "He certainly deserves it more than I do."

Lome, Heilemann and Gonzales are keeping in touch and plan to race together at the same half-marathon next year.

"He could take good care of us as we finish the race," Gonzales laughed. Then he paused a moment, overcome with emotion.

"There's not a day that goes by that I don't have tears of joy. Absolute joy. I'm here with a second chance at this life."

This article originally appeared on USA TODAY: Cardiologist saves two runners having heart attacks at half-marathon