A 25-year-old Orange County man has been sentenced to two to six years in prison for fatally shooting his friend during a house party last year.

Sean Canty was sentenced Monday in an Orange County courtroom packed with friends and relatives of Canty and victim Fredy Hahn of Monroe.

advertisement | advertise on newsday

Hahn was at a party at Canty's home in Highland Hills in July 2011 when Canty brought out a handgun that belonged to his father, a retired New York City police officer.

Authorities say Canty pointed the gun at Hahn's head and pulled the trigger. Canty didn't know the gun was loaded. It fired, hitting the 32-year-old Hahn in the head. He later died at a hospital.

Canty pleaded guilty in September to a manslaughter charge.