"I apologize for my actions," said Michael Benitez, 23. "It was wrong to do what I did."
Benitez pleaded guilty to second-degree attempted murder in January, shortly after lawyers made opening statements in his trial. The plea carried a negotiated sentence of 25 years in prison.
Defense lawyer Dana Grossblatt of Jericho declined to comment after Nassau County Judge Tammy Robbins' sentence.
Prosecutor Martin Meaney said plainclothes officers stopped Benitez and a companion as they walked near Washington Street and Fulton Avenue in Hempstead Village shortly after 3 a.m. Dec. 2, 2011, to ask them about two street robberies that had been reported in the area an hour earlier.
Benitez ran, police said, and then shot at a uniformed officer who arrived to assist the plainclothes officers.
Police did not release the officer's identity, describing him only as 25 years old and a two-year member of the force. One bullet hit the officer in the back and was stopped by his vest; another hit him in the left arm.
The officer managed to return fire, hitting Benitez three times.
Police initially charged Benitez with attempted murder, assault and criminal possession of a weapon.