BRUNSWICK — Brunswick police on Friday morning arrested a Brunswick man who had held police at bay for much of the night using a high-powered rifle.

Police arrested Matthew Senecal, 39, of 31 Emerald Lane, and charged him with domestic violence, reckless conduct and domestic violence terrorizing, said Brunswick Police Deputy Chief Marc Hagan.

During a domestic dispute late Thursday night, Senecal fired a gun while he was in his garage, Hagan said. The bullet entered a bedroom above the garage, but nobody was in the room at the time, he said.

Before police arrived, Senecal’s wife and two young children fled the home and ran to a neighbors house, Hagan said.

The standoff began after midnight and was resolved at 5:37 a.m. after Senecal surrendered peacefully. Hagan said police negotiators had called Senecal on his cellphone and asked him to come out of the house.

Collinsbrook Road and Emerald Lane were closed to traffic during the standoff. Police used reverse 9-1-1 to alert residents within a half-mile of the standoff and asked them to stay away from their windows.