A lucky coincidence changed a man’s fate and saved his life.

Don’t take a nap next time you’re on an airplane — you may just end up helping to save a stranger’s life.

That was the case for Emily Raines, a former nurse who was flying back home from a vacation in the Bahamas with her boyfriend when the unthinkable happened.

A flight attendant used the plane’s intercom to announce that a passenger was experiencing a medical emergency and required immediate assistance.

She asked for assistance from anyone aboard the aircraft with medical experience.

A man aboard the plane was in the middle of a medical crisis that required immediate intervention.

And luckily, Emily rose to the call.

A Frightening medical emergency — 30,000 feet in the air

Emily, an acute care nurse at a Baltimore hospital, and her boyfriend Daniel, who also had medical training, immediately sprang into action and volunteered to help.

A man named Michael was sitting just a few rows ahead of Emily and Daniel, and his heart suddenly stopped beating during the flight.

It was apparent that every second counted. As Emily and Daniel made their way to Michael, they started crafting their medical plan.

“On our way up there I was trying to pregame like ‘hey if we have to do compressions, I need you to do compressions. I’ll take care of everything else,’” Emily said, to CBS News.

Emily assessed her victim and immediately recognized he was in dire need of medical care.

“I see him slumped over in the seat, his face is completely purple, and he’s Caucasian, so it was quite alarming, obviously, seeing his face look that way,” she said.

Other passengers began to help by opening medical bags as Emily methodically began to treat Michael.

The miraculous mid-air rescue

There were roughly 30 minutes left before the plane was expected to make its landing, and they were the only qualified people aboard the aircraft that could make a difference in this life-threatening situation

Daniel and Emily began several rounds of compressions while in mid-air. In spite of their efforts, Michael wasn’t immediately responsive.

They were determined to revive him and refused to give up.

After 23 grueling minutes of CPR, Michael’s condition began to improve.

“I would say, like, 7 minutes before we landed is when we got him back to life,” Emily said.

Emily and Daniel continued treating Michael and kept a watchful eye on their new patient until the airplane landed.

First responders rushed Michael to the hospital, where doctors took over his care.

Relieved passengers aboard the plane began celebrating Emily and Daniel as they returned to their seats.

 “We were amped because it’s so awesome to have that feeling, and afterwards, you’re just like, ‘oh wow, we did this, we saved somebody’s life,’” Raines said.

Michael’s wife was all too aware of how fortunate it was that Emily and Daniel were on that particular flight. After the initial shock wore off, and Michael’s condition stabilized, she reached out to the heroes that were responsible for saving her husband’s life.

She expressed her gratitude in a heartfelt text to Emily.

“Michael is home and doing remarkably well,” she wrote.

“We are still not completely sure what happened. He didn’t have a heart attack. Obviously, his heart stopped, but they believe multiple factors played a role mostly, it was due to low oxygen levels,” she said.

“ I cannot possibly thank you enough for saving Michael’s life. There are no words. If I could, I would love to at least make you some cookies…”

It was sheer coincidence that Emily and Daniel were on the same flight as Michael, and were able to rely on their medical training to save Michael’s life.

To do so with the limited resources available on an aircraft that was in flight is truly a miracle.