A Freeport gang member received a six-year prison sentence Thursday for his role in a narcotics and dogfighting ring, Nassau County prosecutors said.

As part of the sentence, Shaheem Allen, 24, was “barred from being near any animal until 2031,” District Attorney Madeline Singas said Friday in a statement.

Allen, 24, pleaded guilty on Jan. 26 to felony drug charges, attempted assault, criminal possession of a weapon and other crimes. Authorities said he shot at a rival gang member in retaliation for a previous shooting in 2014.

Allen dealt heroin and other drugs in the Freeport and Roosevelt areas, authorities said.

Between March 29 and May 13, 2015, Allen was also involved in breeding and training pit bulls to fight, Singas said.

“Across his various violent criminal enterprises, Shaheem Allen preyed upon both addicts and defenseless animals to enrich himself,” she said.

Most of the two dozen pitbulls rescued by authorities have been rehabilitated, the district attorney’s office said.

Get the latest news and more great videos at NewsdayTV Credit: Newsday

Women hoping to become deacons ... Out East: Southold Fish Market ... Get the latest news and more great videos at NewsdayTV

Get the latest news and more great videos at NewsdayTV Credit: Newsday

Women hoping to become deacons ... Out East: Southold Fish Market ... Get the latest news and more great videos at NewsdayTV

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME