Three men tried to rob an off-duty NYPD officer in the Bronx early on Monday, but the officer shot one of them as the other two ran away, police said.

Three men set on the off-duty cop as he walked at Creston Avenue and East 179th Street in Mount Hope at about 4 a.m., authorities say.

The officer’s mother says that the officer was video-chatting on a phone with his son when the three armed men jumped him.

They held him at knifepoint and stole his cellphone, according to authorities. At some point during the mugging, one of them saw his police badge and started yelling "shoot him!" in Spanish.

That’s when the officer pulled his weapon and shot one of the suspects in the body, police said.

“I heard the first five shots and immediately got dressed,” said witness Luis Delvalle, who called the police.

“I stayed on the phone with the 911 operator. I gave him a description through the window while [the officer] was standing out there with his weapon drawn and was holding one individual down,” said Delvalle.

While the other two men were allegedly able to take some of the officer’s belongings, they dropped them and ran away when they realized he was law enforcement, police said.

The second two suspects, who are armed with a gun and knife, were still on the run Monday morning, according to police.

There was a huge NYPD response at the scene, with streets blocked off for the investigation.

The officer was not injured in the robbery but was taken to Jacobi Hospital for evaluation. The suspect he shot was taken to St. Barnabas Hospital in stable condition.