A Deer Park man was sentenced Friday to 19 years to life in prison for stabbing a woman in 2015 after an argument over leaving a party, Suffolk prosecutors said.

Gregory Barnes, 53, considered a “persistent violent felony offender,” was convicted in January of second-degree assault for using a large kitchen knife to stab Joyce Thomas of Huntington Station in the back of the head.

She has recovered from injuries, which she sustained on Nov. 7, 2015 during a party at her friend’s Deer Park home, the Suffolk County district attorney’s office said.

Permanent orders of protection were issued for the victim and an eyewitness to the crime, prosecutors said. Barnes has four other violent felony convictions on his record, officials said.

Barnes’ attorney, Richard Stafford of Bohemia, said an appeal would be filed Monday.

“My client has expressed his innocence from the moment I met him,” Stafford said. ” I am confident the appellate courts will agree that the charges against Mr. Barnes should be dismissed.”

advertisement | advertise on newsday

Stafford has said his client and Thomas argued over drug use and dealing at the house.

The attorney said Barnes was trying to take the knife away from Thomas and during the struggle she got a “superficial” cut.