A man being driven to a medical appointment Friday morning was saved by police and fire personnel who performed CPR after he had a medical emergency in front of the Westbrook Public Safety building.

A paving crew was working near the public safety building when a female driver pulled over and signaled a police officer directing traffic there that her passenger was in distress, Westbrook Fire Capt. Gerry Provencher said.

The officer put out a radio call for help, and within minutes police officers and fire personnel were on the scene, said Westbrook police Sgt. Tim Gardner, one of the officers to respond.

The man, who appeared to be in his 40s, “looked gray,” said Gardner, a 12-year veteran of the department.

Gardner and another officer performed CPR until emergency medical personnel arrived, he said.

“If this guy had to go down with a heart attack or whatever it was, he did it in the right place, out front of the police station with an officer right there,” Gardner said.

The man was not identified by police because of patient confidentiality laws.

A few minutes later, the man was transported to an area hospital, Gardner said.

“I didn’t think he was coming back. I thought he was done,” Gardner said. “When I heard later on in the day that he actually survived it, I was pleasantly surprised.