A 9-year-old boy’s heart stopped after he was hit in the chest by a baseball during a pickup game Sunday in Charlestown, according to Boston EMS.

The boy was pitching at Ryan Playground around 3 p.m., Deputy Superintendent of Boston EMS Ed Hassan said. The batter hit the ball, which then smacked into the boy, he said.

Paramedics were able to resusciate the boy using a defibrillator, CPR, a breathing tube, and medication.