BROCKTON — A Brockton man was arrested on gun and drug charges by Massachusetts State Police and Brockton Police units Tuesday night after attempting to flee on foot.

Massachusetts State Police say an MSP Gang Unit and the Troop D Community Action Team (CAT), along with Brockton Police officers made the arrest after investigating a Shot Spotter notification.

Just before 9:30 p.m., troopers had begun to assist Brockton Police in investigating shots fired in the area of Grafton Street. After leaving that call, Troopers pulled up in front of an apartment complex at 47 Highland St., a location known to them as the site of frequent crimes involving violence, firearms, and drugs.

Troopers observed a gathering of people in front of the apartment complex. One of the men in the group, upon seeing the troopers, immediately grabbed his waistband, turned and began to sprint away.

While he ran, the suspect, later identified as 23-year-old Shamallah Jones, of Brockton, held his right arm pinned against his waistband while his left arm was swinging naturally. Based on their training and experience, the Troopers recognized that action as consistent with how suspects who are carrying a firearm in their waistbands prevent the weapon from falling out as they run.

Two of the Troopers chased Jones on foot as he ran behind 47 Highland St., through a yard on Green Street, to Glenwood Street, back to Highland, and then to Newbury Street. Pursuing Troopers lost sight of the suspect on Newbury Street.

Other State Troopers and Brockton officers, including a Brockton Police K9 unit that began a track of the suspect, converged on the area to assist. Along the route of the dog’s track, on the front lawn of a Green Street residence, a trooper discovered a semi-automatic pistol, loaded and with its hammer cocked. A Brockton officer subsequently located a knotted plastic twist containing a white powder substance, consistent with cocaine, discarded near a trash barrel at 73 Highland St. Troopers and Officers focused their search on that area. A member of the Brockton Police Gang Unit then found Jones tucked in an alley behind 75 Highland St., hiding behind a snow blower and under a tarp. He was then taken into custody.

The recovered firearm was determined to be a .45 caliber semi-automatic Rock Island Armory 1911 model, with a round in the chamber and eight more in the magazine. Troopers and officers determined that Jones has no license to carry a firearm and has a prior firearm conviction in Suffolk County, for which he is currently on probation. The gun, ammunition, and the twist of cocaine, which totaled approximately four grams, were secured as evidence.

Jones was transported to the Brockton Police Station and charged with Carrying a Loaded Firearm Without a License; Carrying a Firearm Without a License, Second Offense; Possession of a Class B Substance (cocaine); Trespassing; and Resisting Arrest.

Another male who was standing with Jones outside of the 47 Highland Avenue residence had pushed a Trooper who was detaining him for investigation. That man will be summonsed to court for assault and battery on a police officer.