(CNN) M.J. Crumity was just an ordinary eighth-grade boy playing dodgeball in his gym class in Florida on October 1 when his pacemaker quit working. What happened next was extraordinary.

M.J. collapsed on the floor and went into cardiac arrest. A coach called Madison County Central School's school resource officer, Sgt. Joey Knight, for help.

"I bolted to my truck or my patrol vehicle and drove down to the gym to find him unresponsive lying on the gym floor," Knight told CNN affiliate WCTV

Knight, a trained emergency medical technician, immediately began CPR. School nurse Annie Dyke arrived with an automatic external defibrillator.

"They are saying, 'He is not breathing,' and you are just saying, 'I got to get there, got to get there, got to get there,'" Dyke said.

They applied the defibrillator, and Knight "did more compressions." He noted that the school principal was there standing off to the side praying. M.J. became responsive and was taken to the hospital.

Knight said he was trained as EMT in 1998 and has worked in law enforcement for 12 years. For the last two years, he's been at Madison County Central School, located 60 miles east of Tallahassee.

It wasn't his first time reviving someone with CPR. But as a school resource officer, he sees young students every day and this was different.

"This was like one of your own," he said. "I couldn't sleep that night until I knew he was OK."

The quick response may have saved M.J.'s life

Crumity's mother, Stacy Davis, told CNN she got a call at work in Lake Park, Georgia, from a relative around 3 p.m. Tuesday, who told her M.J. had "passed out" at school.

"My heart dropped three of four times," she said. "I was hysterical, and I was praying."

Crumity has a heart condition called hypertrophic cardiomyopathy, in which the heart muscle is too thick and makes it difficult for the heart to pump blood.

Davis said her son needed open heart surgery in 2008 when he was three years old to install a pacemaker and to cut out muscle around the heart. But more than a decade later, the device failed.

"For some reason it didn't shock him back when he needed it," she said. But the combined efforts of Knight and Dyke worked where the pacemaker didn't.

"I don't think I'd be here if not for them," M.J. told WCTV on Tuesday when he returned to school with a reprogrammed pacemaker and his medication adjusted.

'A walking miracle'

It wouldn't be until around midnight on October 1, though, until Davis was able to see her son in the hospital.

"I can't even describe how glorified I feel that it turned out this way," Davis said. "Miracles do happen."

Davis set up a GoFundMe campaign to help cover living and travel expenses while she takes time off work to care for her son.

"I don't intend to back to work until my son is fully functional," she wrote.

She said she herself will never be the same, but added it has "changed everyone's perspective."

Knight said he's "proud to see M.J. walking around," and he feels an urge to check in on him each day to make sure he's OK.

M.J. doesn't remember anything about the life-threatening incident. But his mother says Knight's check-ins are helping her shy son start to "open up more."

Dyke called M.J. "a walking miracle."

"He is here for a reason and I hope whatever he wants, that his dreams come true," she said.