When someone’s heart stops, there are just minutes to save them from brain damage or death; by the time medics arrive, it can be too late. This is the problem former San Ramon Valley Fire Department chief Richard Price set out to solve with the crowdsourced iOS app, PulsePoint.

Price came up with the idea for the app after a tragedy that happened feet from where he was sitting, reports Re/code.

He was off-duty at a local deli when he heard sirens. Emergency vehicles pulled up and he rushed outside to see what was going on. A man in a shop next door had collapsed and emergency responders were unable to revive him.

“He was on the other side of the wall, I couldn’t see him,” Price says. “He lay there unconscious with no one doing CPR. I had a (automated defibrillator) nearby in my vehicle.”

PulsePoint is a free app that can be downloaded by both professionals and amateurs alike. When a 911 center in a connected community gets a call to a cardiac arrest, the location is immediately sent to any PulsePoint users close by. It also alerts them to the locations of nearby automatic defibrillators.

Los Angeles County began using the system earlier this month, and there are around 700 other local communities across 20 states who have so far signed up to the service. Price says the eventual goal is to be connected to every 911 call center in the Unites States.

The app uses sophisticated location-based services to alert trained citizens in the immediate vicinity of the need for CPR. The application also directs these citizen rescuers to the exact location of the closest public access Automated External Defibrillator (AED).

If you’re CPR trained, you can download the free app on the App Store. A reader in the comments also alerted us to a UK version of the app, GoodSAM Responder, also available on iTunes.