BROOKLYN - The man accused of shooting an off-duty officer during an attempted robbery at a Brooklyn hair salon was arraigned today.

According to the district attorney's office, Winston Cox has been charged with attempted murder after he allegedly held up a Franklin Avenue hair salon in October.

Police say Detective Feris Jones was getting her hair done at the time and fired back at Cox after being shot, striking him in the hand. She is credited with stopping the heist and keeping everyone else in the salon safe.

Officials say Cox faces 40 years to life in prison if convicted.

Man indicted in Bed-Stuy salon shooting