Police say a man who opened fire on officers trying to serve an arrest warrant at a Massachusetts house and engaged them in a standoff for several hours has killed himself.

A Middleborough police spokesman confirms 38-year-old John Mann's suicide by an "apparent self-inflicted gunshot wound."

Police say they pulled back, took cover and established a perimeter around the house as Mann barricaded himself inside on Wednesday. They say they tried unsuccessfully to establish contact with him.

The regional SWAT team was called to the scene. Officers who later went inside found Mann dead.

A rifle and two handguns were recovered from inside the home and were seized as evidence.