HAVERHILL — An apparent standoff by a woman who barricaded herself in her apartment brought a massive police response to Highland Avenue late Thursday night.

Haverhill police, along with officers from the Northeastern Massachusetts Law Enforcement Council (NEMLEC) and state troopers, swarmed the area around Highland Avenue and Summer Street. Police blocked Highland Avenue as several officers, clad in helmets and military fatigues, headed toward an apartment building on that street.

The scene was cleared by 11:30 p.m. as word spread that the unidentified woman was in custody.

A statement on the Haverhill police Facebook page stated the situation was resolved peacefully. Residents were thanked for their patience during the incident and as streets were blocked off temporarily.

Jennifer Ortiz, of 95 Summer St., who lives near Highland Avenue, said, “I heard that someone tried to kill herself.”

Ricky Gill, of West Lowell Avenue, who was among several bystanders who braved the cold to watch what was going on, said he had heard that a woman reportedly cut her wrists after she broke a window and then called 911.

When firefighters and EMTs arrived, she reportedly brandished a firearm, he said. That prompted the intense police response.

Haverhill police officers at the scene declined to comment. Aside from a statement that the incident had ended peacefully, there was no comment from the Haverhill Police Department as of press time.

“We are assisting,” said Trooper Paul Sullivan, spokesman for the Massachusetts State Police. He referred questions to the Haverhill police.

At least one state police helicopter hovered over the scene. Two Trinity ambulances were parked on Summer Street along with numerous police vehicles and a large NEMLEC van.

Woburn, North Reading and Dunstable were among the communities that sent officers to Haverhill.