A retired New York City police officer and a doctor were injured Wednesday morning in Oceanside when the retired man’s gun went off inside the doctor’s office, Nassau County police said.

The retiree, 77, was struck in the leg and the doctor in the foot. Both men were taken to an area hospital for treatment of nonlife threatening injuries.

advertisement | advertise on newsday

Nassau County police said the accident took place at 10:22 a.m. at a medical office located at 3227 Long Beach Rd.

Police say the former officer removed his licensed 10 mm semi-automatic pistol to show to the male doctor.

“The weapon accidentally discharged a round which struck the owner in the thigh and continued through his leg striking the doctor in the right foot,” Nassau County Police said in a statement.

Nassau Police investigate the scene of an accidental shooting at 3227 Long Beach Road on Wednesday, April 27, 2016 in Oceanside. Photo Credit: Howard Schnapp

There is no criminality suspected at this time and the investigation is ongoing, police said.