A man who got into a shootout with police officers in 2012 was sentenced to 28 years to life in prison Friday.
Luis Martinez, 27, was convicted in January of attempted murder and weapons possession.
He opened fire when two officers approached him on the Lower East Side.
In court, Martinez said he didn't know that they were police officers and said he was acting in self-defense.
The officers chased him down and returned fire, hitting Martinez in the buttocks before arresting him.
One officer escaped injury when a bullet hit a spare ammunition magazine on his belt.