A man held his wife captive for days in Brookeville, Maryland, and then killed three people inside a neighbor's home on Monday when she ran for help, police say.

Montgomery County police say three people were shot and killed in a house on Brown Farm Way: one person who lived there, another person who worked there and a third person who was visiting from out of town. Police did not immediately identify them.

Christopher Wilson Snyder, 41, killed himself after an hourslong standoff with police. Three people, including his wife, were able to escape the chaos. Officials did not release her name.

Snyder held his wife captive over the weekend, she told police, police chief Tom Manger said at a news conference. She was able to escape on Monday. But Snyder chased her to a neighbor's house across the street.

Snyder opened fire at the neighbor's house, which had at least six people inside. Three were shot and killed, and another three were able to flee. Multiple people called 911.

Neighbors said they heard gunfire and knew something was wrong.

Police responded about 3:45 p.m. Monday and discovered Snyder had run back to his own home and barricaded himself inside.

Police set up a perimeter stretching about a mile around Snyder's home and others on the cul-de-sac. Residents were advised to shelter in place.

Snyder began talking to police negotiators by phone, but he refused to surrender. After several hours, at about 11 p.m., a SWAT team vehicle rammed the front door and officers set off what appeared to be a flash-bang grenade at the rear of the home, Chopper4 video showed.

Snyder was on the phone with police negotiators when police breached the home, Manger said.

"Did they just break in the front door?" Snyder asked.

Then, he hung up the phone and shot himself once, police say. He died of his injuries.

Snyder spoke of explosives during his conversation with a police negotiator, so officials carefully inspected the home, Manger said.

Officers had contact with Snyder a number of times previously, Manger said.

Officers with the Bureau of Alcohol, Tobacco, Firearms and Explosives were on the scene. An extensive police presence was evident throughout the area, slowing and rerouting some traffic near Sunshine.

Before sunrise Tuesday, investigators hauled off two vehicles from the area: a Cadillac Escalade SUV and a Dodge Dart sedan.