A trooper with the Massachusetts State Police suffered a gunshot wound late Thursday just as he arrived at a crime scene in Springfield, according to reports.

The trooper, who was not identified, was responding to a "ShotSpotter" alert, in which an electronic detection system helps police determine if gunshots are fired in a particular area. It happened around 11:25 p.m., WCVB-TV of Boston reported.

The trooper received medical attention at the scene and was taken to a local hospital. He was expected to be released after treatment for non-life-threatening wounds, according to WCVB.

NEW HAMPSHIRE TROOPER IN STABLE CONDITION AFTER BEING SHOT; SUSPECT DEAD

It was unclear whether a suspect had been apprehended in connection with the shooting.

The trooper graduated from the academy in May, WesternMassNews reported.

The State Police union tweeted support for the trooper early New Year’s Day.

CLICK HERE TO GET THE FOX NEWS APP

"Tonight, one of our members has a lot to be thankful for," the message read. "Not the way to end and start off the New Year, with another Trooper being shot!"

The incident happened a little more than a week after a state trooper was wounded in New Hampshire in a confrontation with a suspect who was killed at the scene.