The accidental shooting Tuesday that left a 3-year-old Smithtown boy with bullet wounds to his belly and arm happened when his father, an off-duty MTA police officer, discharged his gun, also injuring himself, Suffolk police said Wednesday.

Police said in a news release that the father accidentally discharged his gun about 7 p.m. in the family's home on Devon Lane. Fourth Precinct detectives are continuing to investigate, police said.

advertisement | advertise on newsday

The father and son are at Stony Brook University Hospital in stable condition, according to police. The boy had grazing bullet wounds to his belly and arm, police said Tuesday, and underwent surgery. Police Wednesday did not specify the father's injuries. A law enforcement source said the officer involved was an 11-year MTA Police veteran who works in the canine unit.

While not confirming the identity of the officer, an MTA spokesman said the officer is on sick leave. In a statement, the MTA said: "We are aware of the shooting incident involving the off-duty MTA Police Officer, which is being investigated by the Suffolk County Police Department. The MTA PD Internal Affairs Bureau will investigate once the Suffolk PD completes its investigation."

The boy was first taken Tuesday to St. Catherine of Siena Medical Center in Smithtown, then transferred to Stony Brook where, police said, he had the surgery.