Authorities said Barnett was slashed in the left eye Wednesday morning by an emotionally disturbed man — identified as 46-year-old Edjar Owens — as he was on patrol outside Jamaica Station in Queens.

Barnett, who has been a MTA officer for 13 years and is a lieutenant commander in the naval reserve that has served in Iraq and Afghanistan, followed protocol and repeatedly told the man to drop his knife even after the brutal blow to the eye, authorities said.

When the Owens didn’t comply, Barnett fired four shots — three of which struck and killed the suspect, authorities said Wednesday.

Police said Owens had a previous history of unprovoked attacks on cops, including incidents in 2006 and 2007.