Joey Swoll took to social media to share his harrowing experience at the hospital recently.

On Sunday, the "CEO of Gym Positivity" tweeted about the routine diagnostic angiogram he underwent on Friday and revealed that a piece of the tool used for the procedure accidentally got detached and fell inside his heart.

"One day home from the cardiac ICU, and I feel great but VERY sore and very beat up. I went in Friday for a routine diagnostic angiogram, which was supposed to take 30-45 minutes. During the procedure, a piece of the tool they used fell off inside my heart, causing a LOT of problems and me to crash," he shared on X, formerly Twitter.

RELATED: Influencer Dies Of Pneumonia Days After Being Misdiagnosed With Dengue

"Six hours later, awake and praying for every second of it, after going in through both sides of my groin and my wrist, they were finally able to retrieve it. It was a MIRACLE."

"The doctor has NEVER seen this happen before. I am at home, healthy, doing work, feeling great, but just very physically and mentally beat up," he added before thanking everyone who sent him prayers and kind words.

RELATED: Singer Gets Surprise Facelift After Bike Accident Surgery: 'I Didn't Ask For It'

The diagnostic procedure Swoll has undergone uses X-ray images to look for blockages in the blood vessels. During an angiogram procedure, a catheter is inserted into an artery. Once it is inside, the doctor will carefully guide it to the blood vessel to be examined, according to Medical News Today.

A contrast dye will then be injected through the catheter to take X-ray images of the blood vessel.

In a separate tweet, the fitness influencer thanked everyone who took care of him during his six hours on the operating table.

"Had a scare this week with what was supposed to be a routine 30-45 min heart surgery ended up being 6 hours on the table. In the end, I made it, I'm home, and I'm 100% for the first time in years," he wrote.

"My heart is the best it's ever been. I'm SO thankful for all [the] incredible doctors, nurses, and staff [who] took care of me at Hoag Hospital."

Swoll also told one netizen that the tool that fell off inside his heart "is being sent in for diagnostics," and he will be getting his hands on a full report soon.

"My main concern is this NEVER happening to anyone again and just getting my mind right. I'm very grateful for the team that was in there with me and saved me," he wrote, responding to the netizen who suggested taking legal action for the incident.