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: Bronze Huey Newton Bust Unveiled In West Oakland Birthplace Of Black Panthers

“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.

READ MORE: San Jose Men Plead Guilty to Used Car Scam On Craigslist

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.

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: Big Rig Crash Slows Eastbound Commute On Highway 24

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