A Massachusetts highway turned into a terrifying scene for commuters when a man with a gun sparked heavy police presence and prompted road closures ...

and TMZ has a look at the chaos. Eyewitnesses tell TMZ ..

. Interstate 190 was closed just north of Worcester, Mass. Wednesday afternoon after a man with a gun took to the highway on foot .

.. dipping and diving in between cars in standstill traffic, attempting to avoid capture.

Mass. State Police spokesman Brandon Doherty told TMZ ..

. troopers and Worcester police responded to a report of a man with a gun around 3:40 PM local time ..

. and a shooting occurred shortly thereafter. As you can see from the footage, multiple officers descended onto the scene, pursuing the suspect from various angles.

Cops and the suspect exchanged gunfire toward the end of the chase ...

at which point the man apparently shot himself in the head before he could be detained. Trooper Doherty told us the suspect is “in custody” -- meaning there is “no longer a threat” – but that does not mean he is alive. Medical personnel responded to the scene .

.. but no officers were struck.

It's not currently clear if the man died from a self-inflicted gunshot wound ...

but he notably collapsed after pulling the trigger. This update comes an hour after Massachusetts Transportation urged commuters on X to avoid I-190 near Worcester, stating the highway was closed "in both directions at exit 2." In #Worcester , I-190 closed in both directions at exit 2.

Worce.