A homeless man charged with shooting another man in June in Port Jefferson because, police said, the suspect thought the victim was spreading rumors about him, was sentenced on Monday to 17 years in prison, Suffolk District Attorney Thomas Spota’s office said .

The sentencing by Suffolk County Court Judge Timothy Mazzei comes after Alain Jean pleaded guilty last month to first-degree assault in the June 11 shooting of Joseph Panattiere, 23, who was also homeless.

advertisement | advertise on newsday

Panattiere was shot as many as four times with a .22-caliber pistol during a scuffle in an abandoned house, authorities said.

The sentence also carries a 27-year order of protection and 5 years of post-release supervision, court records show.

Alain’s attorney, who according to court records is Donald Mates of Hauppauge, could not be reached for comment.