NEW YORK - (AP) - A transit officer shot and killed an emotionally disturbed man Wednesday after the man stabbed him in the eye without warning outside a commuter rail station, authorities said.

Metropolitan Transportation Authority Officer John Barnett underwent surgery after suffering a "devastating wound" to his left eye and was recovering in the intensive care unit, MTA officials said. The 45-year-old officer was conscious before the operation, spoke to his family and took a phone call from Gov. Andrew Cuomo, who wished him a full recovery. Officials said it's not yet clear whether he will retain any sight in his injured eye.

Authorities identified Barnett's assailant as Edgar Owens, 46, of the Bronx. They said he had a history of unprovoked run-ins with police, including one in 2006 when he walked into a police station and punched an officer in the face.

According to an MTA account, Barnett was on routine patrol on the street outside a Long Island Railroad Station in Queens on Wednesday morning when Owens, a knife at his side, approached him.

After he was stabbed, the officer "stepped back, drew his weapon and warned Owens repeatedly to drop his knife," the MTA said in a statement. "Owens continued approaching Officer Barnett with the knife in his hand. Officer Barnett fired his weapon four times, striking Owens three times in his jaw, chest and hip."

Owens was pronounced dead at a hospital.

Barnett, a 13-year transit police veteran with no previous line-of-duty shootings, "did exactly what we expect of all of our officers: In a split second, confronted with a violent individual who posed a threat to everyone around him, he took action without regard to his personal safety," MTA Chairman Joseph J. Lhota said in a statement. "We are all in awe of his bravery."