Fox 13 sportscaster Joe Wren almost made local TV news history in the worst possible way a few years ago. He nearly died on the air.

Walking on set to do an interview with Utah Jazz owner Larry Miller in 2007, “I was dizzy. I could hardly even read the teleprompter. My arm hurt,” Wren said. “All classic symptoms of a heart attack. I was thinking, ‘Am I going to die on live TV?’”

Of all the ways you don’t want to become a viral video, that’s at the top of the list.

This had been going on for years. Wren was having “weird, funky pains” when he worked for KSL radio from 1998 to 2000. The pain worsened when he moved to KSTU-Ch. 13. Despite passing multiple medical tests, Wren continued to suffer pain from his heart symptoms for years.

He even tried — unsuccessfully — to get out of his contract at KSTU because “I was afraid for my life. … It was my dream job, but it was a nightmare.”

He did not, however, tell his bosses at Ch. 13 the real reason he wanted out. Or communicate his symptoms to management at either KSL or KSTU.

It turned out that Wren very well might have died on set in 2007. After several tests, his doctor assured him it was nothing — but it was a misdiagnosis. His pains continued, and Wren suffered a massive heart attack in September 2016 that nearly took his life.

Actually, he did die. Three times. His arteries were 98 percent blocked.

This is where his story took some turns that Wren did not expect. He said he woke up in surgery wondering what was going on and heard a voice telling him he would make “a full recovery.” Doctors at the time were telling his family to prepare for the worst.

Wren even has a picture of himself in a hospital bed “with all these tubes coming out of me,” and a big smile on his face in the midst of his extremely concerned family.

Yes, he said he saw the bright lights you hear about from people who are revived after being dead.

I never was into this life-after-death stuff,” he said. “But it absolutely happened. The only words that I heard were, ‘Many, many dear souls are praying for you.’ And I felt prayers going through me.”

He felt “overjoyed” and “giddy,” at the same time thinking, “Well, this is kind of crazy.”

But Wren made it through quadruple-bypass open-heart surgery and made a complete recovery. And he knows how rare that is for someone in his situation.

An EMT came up to me and said, ‘I’ve been doing this for 27 years. We’ve saved maybe two people who survived what happened to you,’” he said. “So all I can figure is there’s a grand purpose and I can help a lot of people. And I’m going to.”

He jumped at the chance to be a spokesman for the local chapter of the American Heart Association. Wren wants to tell people to take their symptoms seriously, even if their doctors don’t. To insist on further tests if they’re suffering. To get their cholesterol checked. And to get to the hospital ASAP if they’re feeling any symptoms.

Don’t make an appointment. Go to the emergency room,” he said. The worst-case scenario can be controlled if you get in there. But you do not want to face it laying down on your back in a dark room. It was like 100 times your worst nightmare.”

He said he feels an obligation to share that message.

If I don’t get the word out, then maybe I’m subject to not living much longer,” he said with a smile. “But I don’t want anybody to ever go through what I went through.”

And Wren, who describes himself as “a deeply religious man,” has another message.

“I’m really, really grateful I lived, but I’m really grateful for where we’re all going to go, too,” he said. “It’s going to be grand. It’s wonderful. I look forward to going back.

I don’t have any fear of death right now. Neither should you.”

KSTU-Ch. 13 sports anchor Joe Wren is the author of “Heavenly Being: A Witness to Glorious Life After Death,” which is available on Amazon.com and barnesandnoble.com, and will soon be sold in local bookstores. He can be reached at joewren2@msn.com.