After suffering a cardiac arrest, a Minnesota teen has made a miracle recovery and is now back on the baseball field where he almost lost his life, KARE-11 News reports.

In May, 15-year-old Andy Walerius suddenly collapsed during baseball practice.

"After three or four pitches, he just stood up, then went flat on his face," said his dad, Ken, who coaches the team.

Walerius was rushed to Children's Hospital in Minneapolis where a series of tests were run to determine what was wrong.

The results would shock the doctors present.

Dr. Stephen Kurachek, a pediatric critical care specialist at the hospital, said that Walerius' lungs were discovered to be filled with blood clots and the stress to his heart was potentially deadly.

“You’re almost better off having a heart attack than what he had,” Kurachek said, according to a post about Walerius on the hospital's website.

But less than a day after he was admitted, Walerius' heart stopped in the middle of a medical procedure.

"I was sitting there thinking, I wanted more than 15 years with him. How could this be?" Andy's mother, Joan, told the station.

Walerius flatlined for 10 agonizing minutes, but remarkably, Kurachek eventually managed to revive the young boy.

"As I told one of my colleagues, this is why we go to church. This is why we pray," the doctor told KARE-11 News.

For the next three weeks, Walerius recuperated in the hospital, enduring a ventilator and a heart bypass machine.

Incredibly, a little more than a month after his collapse, the young survivor was back on the baseball field -- this time facing a different kind of curveball, with health and hope on his side.

For more on Andy Walerius and his story, visit his CaringBridge journal here.

Related on HuffPost: