HAMILTON (CBS) – The heroic actions of two off-duty emergency responders may have saved a man’s life on the North Shore on Sunday.

During the “Tour de Cure” bicycle race, one rider went down with a heart attack and nearly died.

READ MORE: Keller @ Large: Senator Ted Cruz's Latest Bill Would Make Massachusetts A Port For Migrants - And Target Of Political Scorn

WBZ-TV’s Jim Smith reports.

Every second counted as Hamilton firefighters and EMTs rushed to a report of a bicyclist down. A 47-year-0ld man riding on a country road along with participants in the charity bike rice suffered a heart attack. He had no pulse and no heart beat.

“Time is very important. It takes about four minutes before the brain cells start to deteriorate when the patient is not breathing or pulsing. In ten minutes, it’s brain death,” said Skip Mullin, a Hamilton first-responder.

READ MORE: I'm Vaccinated; Can I Start Eating Inside Restaurants? Dr. Mallika Marshall Answers Your COVID-19 Questions

Fortunately, an off-duty nurse and EMT were already at the race, and they began CPR immediately.

“That gentleman couldn’t have been any luckier to have two off-duty EMS workers sitting two cars behind the incident where it happened, and they jumped into action,” said Capt. Mark Goodwin of the Hamilton Fire Department.

The bicyclist was taken to Beverly Hospital, and his condition is unknown. He was breathing thanks to a lot of teamwork.

“He had a pulse. He was breathing and in nine minutes of our dispatch time, and you really have to credit the early intervention of people at the scene,” said Mullin.

MORE NEWS: Body Found In Hampton River, N.H., By Boat Club Members

Hamilton firefighters said this story is an example why everyone should take a CPR course.