An Erie County sheriff’s deputy pleaded guilty Monday to vehicular assault and driving while intoxicated for striking and critically injuring a motorcyclist in August at Sheridan Drive and Bailey Avenue in Amherst.

Michael Haug, 29, of Kenmore, faces anywhere from probation to up to seven years in state prison when he’s sentenced by Erie County Judge Thomas P. Franczyk on Jan. 30.

“The Office of District Attorney will prosecute an offender regardless of whether he wears a badge,” Erie County District Attorney Frank A. Sedita III said. “This defendant was prosecuted to the fullest extent of the law.”

The crash happened at about 4 a.m. Aug. 4, when the deputy was off duty.

The victim, Daniel J. Colosimo, 37, of the Town of Tonawanda, suffered a traumatic brain injury when he was thrown from his 1982 Suzuki motorcycle. He was taken to Erie County Medical Center, where he was admitted in critical condition and treated for his injuries .

Colosimo was stopped at a red light on the westbound side of Sheridan Drive, at Bailey Avenue. He was struck from behind by Haug, who was driving a 2011 Jeep, Amherst police said.

Colosimo was in the courtroom Monday when Haug pleaded guilty.

Haug refused a blood-alcohol test the morning of the collision, and Amherst police obtained a court order from a judge to have his blood drawn, authorities said.

His blood-alcohol content was 0.25 percent, which allowed prosecutors to upgrade the vehicular assault charge to a higher level of felony than he was initially charged with, said Kelley A. Omel, chief of the Erie County District Attorney’s Office’s Vehicular Crimes Bureau.

Haug had been on the force for 5½ years at the time of the crash.

The crash tore Colosimo’s small intestine, bruised his internal organs, broke a leg in three places and ripped off his helmet when he landed on his head.