Officer Eugene Donnelly has been accused of driving while intoxicated after crashing his car in the Bronx. (credit: CBS2)

NEW YORK (CBSNewYork/AP) — An NYPD officer accused of drunkenly breaking into a woman’s apartment and punching her 20 times has pleaded guilty to misdemeanor assault.

Eugene Donnelly will be sentenced June 1 to three years’ probation and must get treatment for a drinking problem.

Authorities told the New York Daily News on Tuesday the victim told prosecutors the officer needs rehab and not jail time.

On June 10, 2014, Donnelly, of the 46th Precinct, received the Police Combat Cross for taking down an armed suspect who fired at him while he was off duty in 2012, according to the Bronx District Attorney’s office. Afterward, he allegedly went drinking with colleagues and went to sleep at a friend’s apartment, prosecutors said.

Sometime that night, Donnelly woke up finding himself fin the apartment of a woman he did not know in the same building in the Woodlawn section of the Bronx, prosecutors said. He allegedly broke a chain lock to get in, and threw the frightened woman to the floor and beat her in the head, prosecutors said.

A Daily News report at the time said the woman claimed the suspect went on to go into the woman’s refrigerator and drink from her milk container before leaving.

His attorneys have said he was sleepwalking during the attack.

Donnelly, 20, has been suspended and could be fired if he is convicted of department charges filed against him.

He also faces a DWI charge after police say he crashed into three parked cars at 135th Street and Riverside Drive last year.

(© Copyright 2017 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)