A retired NYPD officer accidentally shot a podiatrist in the foot and wounded himself when he pulled out a gun to show it to the doctor at his office on Wednesday, authorities said.

Nassau County police say the 77-year-old retired officer took out his licensed 10 mm semi-automatic pistol inside Dr. Matthew Nester's Long Island office on Wednesday morning.

The weapon accidentally discharged, striking the retired officer in the thigh.

The bullet traveled through his leg and struck Nester in the right foot.

Nester's office declined to comment on the case Wednesday.

The injuries to both men aren't considered to be life-threatening.

Police say no criminality is suspected. An investigation is ongoing.