RALEIGH, N.C. (AP) — A gunman opened fire along a walking trail in North Carolina’s capital city on Thursday, killing five people before leading police on an hourslong manhunt that forced residents across multiple neighborhoods to take shelter in their homes.

Raleigh Mayor Mary-Ann Baldwin told reporters that multiple people were shot on the Neuse River Greenway around 5 p.m. and that an off-duty police officer was among those killed. She said at least two others were taken to hospitals, including another police officer. Officers from numerous law enforcement agencies swarmed the area, closing roads and warning residents to stay inside while they searched for the gunman.

Officers eventually contained the suspect in a residence before arresting him sometime before 10 p.m., authorities said. The suspect’s identity and motive weren’t released by investigators.

“We must stop this mindless violence in America, we must address gun violence,” the mayor said. “We have much to do, and tonight we have much to mourn.”

Brooke Medina, who lives in the neighborhood bordering the greenway, was driving home at around 5:15 p.m. when she saw about two dozen police cars, both marked and unmarked, race toward the residential area about 9 miles (14 kilometers) from Raleigh’s downtown. She then saw ambulances speeding the other direction, toward the closest hospital.

She and her husband, who was working from home with their four children, started reaching out to neighbors and realized there was a shelter-in-place order.

The family closed all of their window blinds, locked the doors and congregated in an upstairs hallway together, said Medina, who works as a communications vice president at a think tank. The family listened to the police scanner and watched local news before going back downstairs once the danger seemed to have moved further away from their home.

“We’re just going to hunker down for the rest of the night and be very vigilant. Keep all of our lights on, doors locked,” she said.

She described the neighborhood known as Hedingham as a sprawling, dense, tree-lined neighborhood that’s full of single-family homes, duplexes and townhomes that are more moderately priced compared to other parts of the Raleigh area.

Medina said she often takes her kids on bike rides along the greenway during the day, but typically brings pepper spray along just in case.

“There’s a lot of places one could disappear,” she said.

The Raleigh shooting was the latest in a violent week across the country. Five people were killed Sunday in a shooting at a home in Inman, South Carolina. On Wednesday night two police officers were fatally shot in Connecticut after apparently being drawn into an ambush by an emergency call about possible domestic violence.

It followed shootings of police officers this week in Greenville, Mississippi; Decatur, Illinois; PhiladelphiaLas Vegas and central Florida. Two of those officers, one in Greenville and one Las Vegas, were killed.

Thursday’s violence was the 25th mass killing in 2022 in which the victims were fatally shot, according to The Associated Press/USA TODAY/Northeastern University Mass Killings database. A mass killing is defined as when four or more people are killed excluding the perpetrator.