An off-duty NYPD officer leaving a Brooklyn eatery was confronted by a would-be robber who was shot by the cop in a scuffle on the street.

Early Monday morning, the officer was near the corner of Flatbush and Sixth Avenue in Park Slope when a man approached and tried to rob him, NY1 reported.

RELATED: NYPD officer shooting was friendly fire: Police

The two engaged in a dispute outside Bleachers Restaurant, where the officer had just left, ABC7 reported. A shot was fired during the confrontation, which ended with the suspect being transported to Methodist Hospital in stable condition.

The suspect was in custody and charges were pending, ABC7 added. It remained unclear if he was shot with the officer’s weapon or his own gun.