Jason Gray-Stanford opened up about the life-and-death situation he faced while needing an emergency heart transplant.

In 2018, Gray-Stanford first learned about his heart failure which led him to change his diet and improve his workout routine. But on Dec. 30, 2019, he felt something was wrong with him.

Gray-Stanford dropped more details about the experience in a new interview with PEOPLE for this week's issue. According to the actor, he was feeling fresh before going to the gym for a class. But 15 minutes later, he found himself on the floor.

Though the event was surely embarrassing, it also made him realize something was not right.

He told PEOPLE that, 10 months after losing his consciousness, his doctor told him that his heart and kidneys were in failure. Gray-Stanford received advice that he should get a heart transplant as soon as possible or else he would die within months.

When he almost lost hope, a miracle happened when a matching donor became available on that day.

Jason Gray-Stanford Now Recovering

In November 2020, Gray-Stanford underwent transplantation and continuously made a full recovery since then. Because of the event, he started helping organizations in raising awareness for organ donations and cardiovascular health.

While he is yet to make full recovery, Gray-Stanford remains positive while expressing his gratitude toward his family and fans.

"I am so fortunate and so grateful that I was able to receive this transplant. If there's a modicum of inspiration someone can take from what I've gone through, then it's my job to get out there, and say something. It's as close to a miracle as you get," he told the news outlet.

READ ALSO: Alec Baldwin Wrong Move: This Particular Act Triggered Halyna Hutchins' Husband to Sue 'Rust' Actor

His health scare came years after he felt a symptom for the first time while filming for "X-Files" in 2017. At that time, the actor reportedly felt unusual sluggishness whenever he worked out. Only in January 2018 when a doctor diagnosed him with arrhythmia that caused him great panic.

He was then hospitalized as he also learned about his exact health status and the small blood clot detected in his heart.

The medical director of the St. Paul's Hospital's heart transplant service, Mustafa Toma, said that they did not know for sure what led to Gray-Stanford's condition, but other doctors said that a viral infection triggered it.

Fortunately, the actor has nothing to worry about now, and he has all his time to fully recover from the disease and horrifying experience.

READ MORE: Donny Davis Cause of Death: Comedian, 43, Found Dead in Strip Hotel