An MTA police officer was forced to undergo over four hours of surgery, after a deranged man stabbed him in the eye without warning outside a Long Island Railroad station in Queens on Wednesday.

The New York Times reports that 45-year old officer John Barnett suffered a “devastating wound to his left eye," but still managed to shoot and kill the assailant after he attempted to stab Barnett again.

Authorities say 46-year old Edgar Owens of the Bronx had a record of altercations with police officers including an incident where he walked into a police precinct and suddenly punched a police officer.

A surveillance video from Wednesday revealed the attack was unprovoked. MTA police chief Michael Coan said, "The video shows he just walks right over and stabs him."

A surgeon said it did not appear as though the Fourth of July attack had caused any brain damage.

On Thursday, a spokesman provided an update on Barnett's recovery and said he is out of intensive care and his condition is slowly improving.

Barnett reportedly served in Afghanistan in the Navy Reserves. Barnett's sister described to The Daily News, "He said he was going to go into surgery as a fighter and was going to come out as a fighter. He loves serving his country. It’s ironic that today is the Fourth of July."

View more videos at: http://nbcnewyork.com.