WALNUT CREEK (KCBS)— A 14-year-old basketball player’s life was saved over the weekend by an Automated external defibrillator (AED) after an apparent heart attack during halftime at a game. The medical device has become standard in all Walnut Creek city facilities.

When the 14-year-old boy collapsed Saturday afternoon at the Contra Costa County Jewish Community Center, a nurse in the audience gave him CPR but Wes Allnut with the City of Walnut Creek, said it wasn’t enough.

READ MORE: San Francisco Supervisor Joins Calls For Emergency Funding At City College Amid Looming Layoffs

“The coach ran into our lobby, asked our gym attendant if we had an AED and he said yes, ‘here you go’. So they brought the AED out onto the court,” Allnut said.

It was the electric shock from the AED that brought the boy’s heartbeat back. His dad told Allnutt the boy is recovering at the hospital.

READ MORE: Oakland Unveils City’s Tallest Mural, Spotlighting World Hunger

All Walnut Creek city facilities, especially gyms community centers and golf courses now have these devices.

“Affordability— $2,000, I think it’s something that’s very worth the investment, especially when you can hear the story of a 14-year-old and saving his life,” said Allnutt.

MORE NEWS: COVID Reopening: San Jose Sharks Welcoming Fans Back At SAP Center April 26; Testing Or Vaccination Required

The incident marks the second time the JCC’s AED has been used to save a life.