PORTSMOUTH, N.H. (AP) – A Massachusetts man is in custody after police in Portsmouth, N.H., shot him with beanbags as he headed toward officers with knives in each hand.

Thirty-year-old Daniel Boland of Lowell, Mass., was arrested after barricading himself inside a home for four hours Wednesday night. Police said he had threatened a woman and police officers with knives.

Police fired gas canisters through the windows and eventually Boland emerged, carrying a knife in one hand and a knife and bottle of beer in the other. WMUR-TV video showed the beer bottle exploding after being hit by one beanbag round.

A fourth shot send Boland to the ground, where he was arrested.