Washington - Andi Traynor and Max Montgomery met each other on Facebook through mutual friends. They had gotten together casually and non-romantically a few times, then decided to go surfing early one morning on California's Capitola Beach last October.
When they finished with the waves and were walking off the beach, Montgomery, 56, fell to the ground.
Traynor, a doctor, was confused for a moment. Then she checked and realised he did not have a pulse. He was having a heart attack.
"I saw him fall, and initially I thought he tripped," said Traynor, 45, a medical professor at Stanford University and an anesthesiologist who works with high-risk pregnancies. "I turned him over, and I immediately realized something was very wrong."
She yelled for someone to call 911 and then started CPR. She did a rescue breath and then chest compressions for seven minutes to keep his blood circulating before paramedics arrived. They used a defibrillator on him three times to no avail and then carried him to an ambulance.
She was distraught. She didn't know at the time that videographer Alexander Baker had set up a time lapse video to record nature on the beach and that the entire frightening episode was being recorded.
"You can see me breaking down at that point," Traynor said of the video. "I thought, 'He's dead, people don't live through that.' I can't believe this just happened. How did this just happen? I just felt sadness."
In the ambulance, paramedics used the defibrillator three more times and finally revived Montgomery.
Traynor said she was sure he had died and searched his Facebook to try to find his relatives to let them know. She contacted his sister and was flabbergasted to find out he was alive.
"His sister said, 'He's out of the procedure, do you want to talk to him?' " Traynor said. "I burst into tears."
Montgomery, an outdoorsman and avid runner, got on the phone and apologised to her for collapsing. The next day he had triple bypass surgery.
After the surgery, which was a success, she went to visit his hospital room. He recalled telling her: "Who wants to be with a guy who had heart attack. I won't blame you if you run for the hills."
"I'm not going anywhere," she told him.
For Montgomery, that was a turning point.
"When she said 'I'm not going anywhere,' I felt like my heart started to heal from the inside," he said. "I had a great and fast recovery. I believe it was because I was madly in love."
Six days later, after Montgomery was discharged from the hospital, they went back to Capitola Beach - and had their actual first kiss.
"We do consider the CPR our first kiss," Traynor said. "But the day he got out of the hospital, we had our first real kiss."