An on-duty cop was arrested for drunk driving overnight Thursday after he allegedly shot his partner in the wrist, police said.

According to the criminal complaint, Detective Jay Poggi, 58, was allegedly showing the gun to his partner, Detective Matthew Sullivan, when it went off. He then allegedly drove Sullivan to Jamaica Hospital.

At the hospital Poggi, who has 31 years experience, allegedly had bloodshot eyes and a blood alcohol level of .113, according to the complaint. Poggi then allegedly refused to submit to a Breathalyzer test at the 112th Precinct.

Poggi was arraigned Thursday evening and was released on his own recognizance, said a spokesman for the Queens district attorney's office.

Both officers worked in the 75th Precinct. It was not the beginning of their shift when the incident took place, police said.

Sullivan, who has been a cop for 16 years, is in stable condition, police said. He had surgery on his wrist, according to the complaint.

The incident is under investigation by internal affairs, police said.

A phone call to Poggi's lawyer, James Moschella, was not returned Thursday.