A 21-year-old pizza delivery driver in Philadelphia turned the tables on a pair of would-be carjackers late Tuesday, drawing his own handgun and shooting one of the suspects in the buttocks, according to police and local reports.

The attempted robbery and carjacking happened just before midnight outside an apartment building in the 7700 block of Stenton Avenue in the Chestnut Hill neighborhood, Philadelphia police said.

The two masked male suspects forced the 21-year-old at gunpoint into the backseat of his car and attempted to rob him and steal the vehicle, FOX29 Philadelphia reported. 

However, the delivery man, who KYW-TV reports was on his first day of the job, was able to foil the would-be robbers. 

PHILADELPHIA DRIVE-BY SHOOTING INJURES 5 AT VIGIL FOR VICTIM KILLED IN GUN VIOLENCE, POLICE SAY

scene of attempted carjacking

The attempted robbery and carjacking happened just before midnight outside an apartment building in the 7700 block of Stenton Avenue in the Chestnut Hill neighborhood, Philadelphia police said. (FOX29 Philadelphia WTXF)

"At one point, the 21-year-old delivery man was able to get out of the vehicle and confronted one of the perpetrators who had a gun and the 21-year-old delivery man, we know, fired at least two shots," Philadelphia Police Chief Inspector Scott Small told reporters.

scene of attempted carjacking

The delivery driver, who was not injured, shot one suspect in the buttocks. The suspect was hospitalized. (FOX29 Philadelphia WTXF)

One suspect, a 23-year-old male, was shot once in the buttocks, police said. Responding officers later found him on the ground nearby.

BURGLARY SUSPECT PICKS WRONG HOUSE AS HOMEOWNERS, BOTH ARMS, SWIFTLY SHOOT HIM

The wounded suspect was taken to a local hospital in stable condition. He was being detained and charges were pending.

police at scene of attempted carjacking

Police said the second suspect fled into Springfield Township. (FOX29 Philadelphia WTXF)

The second suspect is believed to have fled into Springfield Township.

The delivery driver was reportedly not injured during the incident and had a valid license to carry.

CLICK TO GET THE FOX NEWS APP

Police said the investigation remains active and ongoing.