A 13-year-old boy is recovering in hospital after his heart stopped during a hockey game and a defibrillator helped bring back his pulse.

Ali Khaleghi collapsed at a Nov. 14 hockey game at Herbert H. Carnegie Centennial Centre in North York. He had only been on the ice for a few minutes playing for the North York Rangers AAA team and had just blocked a shot a few seconds prior.

"We were just really lucky that, you know, the right people and the equipment was on site to help him," says his sister, Zhenya Selezen.

Doug Jamieson

Doug Jamieson worked with 2 other people to help Ali Khaleghi, who collapsed on the ice during a hockey game. (CBC News)

Arena operator Doug Jamieson ran onto the ice to help the collapsed player. He worked with an off-duty firefighter and a nurse to bring the teen back to life.

"It was a relief when we got low pulse," says Jamieson.They felt for a pulse and started CPR after discovering the boy had no vital signs. Someone ran to get the arena's Automatic External Defibrillator (AED) and the trio delivered a shock to the player.

Khaleghi is now recovering in hospital and has resumed breathing on his own, his family says.

Teen player died in 2013

Some parents felt the situation presented an educational opportunity, demonstrating that it's not only important for rinks to have defibrillators, but also for people to know where they are.

One parent said they didn't know where the arena's defibrillator was located. The parent suggested rinks might want to create a path to the AED to help individuals locate it.

Jordan Boyd

Nova Scotia hockey player Jordan Boyd, 16, died after a cardiac arrest during a training camp in August 2013. (Courtesy of the Boyd family)

​In 2013, a 16-year-old Nova Scotia hockey player died after going into cardiac arrest on the ice during a training camp in New Brunswick. Jordan Boyd had an undiagnosed heart condition.

CBC News later learned that the teen may not have had every opportunity to survive his fatal cardiac arrest. After he collapsed, no one used an AED before paramedics arrived. The league requires that the rink has one.

Paramedics delivered the first AED shocks to Boyd at 10:45 a.m. A 911 call from the rink came in at 10:34 a.m.

While there is no guarantee an AED will save a person's life, Halifax cardiologist Dr. Martin Gardener says the first five minutes offer the best chance for success, with a 70 per cent effectiveness rate.