Five people are dead, including a police officer, after an hourslong shooting Thursday that unfolded in a residential neighborhood of Raleigh, North Carolina, officials said.

Among the dead is an unidentified off-duty Raleigh Police Department officer, Mayor Mary-Ann Baldwin said at a news conference late Thursday. Over an hour after police said they had contained the suspect in a residence in the area, Raleigh Police Department tweeted they had the suspect in custody.

Another Raleigh officer was one of the two people injured in the incident, Baldwin said. That officer, a K9 officer, did not have life-threatening injuries and was released from the hospital Thursday night. The other person injured was in critical condition, Lt. Jason Borneo said.

The suspect is a white male juvenile, Borneo said but did not provide his age.

“All of us in Raleigh right now need to come together,” Baldwin said. “We need to support those in our community who have suffered a terrible loss, a loss of a loved one.”

North Carolina Gov. Roy Cooper said multiple law enforcement agencies were responding to the incident. The Bureau of Alcohol, Tobacco, and Firearms in Charlotte said special agents were also responding.

THIS NEWS IS DEVELOPING INTO THE NIGHT:Sign up for the Evening Briefing

TRACKING THE VIOLENCE:From Congress to California, a scramble for answers

“This is a senseless, horrific, and infuriating act of violence that has been committed,” Cooper said at a news conference.

An investigation is ongoing but there is no longer an active threat to the community, Borneo said.