PITTSFIELD — A city man who allegedly had scuffled with police after his arrest last year has been sentenced to two years in jail on a drug charge.

Elwin S. Bruno, aka Rashawn Bruno, 48, was a passenger in a car that was pulled over on Pine Street in the city on June 8, 2015.

When police tried to search Bruno, he resisted, eventually pinning an officer against a cement sidewalk, drawing a crowd of spectators, according to court documents. Amid the chaos, a state trooper accidently sprayed a fellow officer in the face in an unsuccessful attempt to subdue Bruno.

When Bruno was finally taken into custody, officers allegedly found 52 bags of heroin in his pockets.

Two other occupants of the car, Jaclynn Boyer and Kent Witherell, also were found to be in possession of heroin. They allegedly told police that Bruno had sold the drugs to them.

Bruno pleaded guilty on Friday to one count of possession of heroin with intent to distribute. Charges related to the scuffle with police have been dropped.

Judge John Agostini ordered Bruno to serve a two year sentence at the Berkshire County House of Correction. Boyer and Witherell's cases already have been disposed of.

The investigation was conducted by state troopers assigned to the Cheshire barracks.