A phony physician stitched up a scam at JFK Airport – shouting into his cellphone that he’d been mugged and had no way to get to his emergency surgeries, authorities say.

Concerned bystanders, who overheard his sob story, gave him money supposedly for cab fare so he could get to the hospital and save lives, authorities said yesterday.

Over a two-month period, 29-year-old Michael Cosmi, from Wayne, N.J., pocketed $800, according to Queens District Attorney Richard Brown’s office.

The phony physician pulled his scam at various terminals and allegedly bilked nearly a dozen travelers – including a flight attendant, an NYPD police captain and a rabbi.

Cosmi was charged with scheming to defraud, petit larceny and fraudulent accosting. He faces up to four years in prison.

Cosmi would pretend to talk on the phone, at a high volume so passers-by could hear, telling the presumably nonexistent party on the other end either that he had just been mugged or pickpocketed.

He claimed and that he had get to surgery patients at the fictitious “Brigantine Hospital” in New Jersey, officials said.

He was allegedly observed running this “stranger in distress” scam at “various locations” in the airport between this past Dec. 11 and Feb. 16, and would either use the name “Dr. Michael Stanley” or “Dr. Michael Harris,” according to the DA’s office.

At least 10 victims helped the “doctor,” handing over cash amounts ranging from $75 to $100.

Cosmi was finally caught when a NYPD police captain from Wantagh, L.I., who had already been stung at JFK on Jan. 7 – handing over $100 – overheard him playing the same game two weeks later on the Long Island Rail Road on Jan. 23, law-enforcement sources said.

The captain went to MTA police on the train and had Cosmi arrested.

MTA and Port Authority police were able to find the rest of Cosmi’s victims because he kept a log book of all their contact information – which they gave him, expecting to be reimbursed at a later date.

“By allegedly pretending to be a physician in need in order to gain people’s confidence and exploit their kindness, the defendant did far more damage than just allegedly steal money from his victims – he stole their trust in others, making them less likely to help the truly needed in the future,” Brown said. (p. 13 Metro)