RALEIGH, N.C. — Five people were killed and two others hospitalized after a shooting late Thursday afternoon on a popular greenway in east Raleigh, prompting police to urge residents to stay inside homes while officers searched for the shooter, according to the city.

Friday morning, authorities appeared to be searching a nearby home. We are working to learn more about the investigation. 

Police said the suspect in the shooting was arrested around 9:37 p.m. Thursday. Friday morning, police said described him as a 15-year-old juvenile, and said he was currently critical condition.

An off-duty Raleigh police officer was killed in the shooting.

Another police officer was wounded but was later released from the hospital, police Lt. Jason Borneo said at a news conference just before 11 p.m. at the Municipal Building. One person remains in critical condition.

"You pray that something like this will never happen here. But it did," Raleigh Mayor Mary-Ann Baldwin said at the news conference, which was joined by Gov. Roy Cooper.

"Tonight, terror has reached our doorstep," Cooper said. "The nightmare of every community has come to Raleigh."

"These law enforcement officers ran to the crisis when they knew there was an active shooter ready to kill people," he said.

Cooper earlier offered coordination and law enforcement assistance as police searched the shooter, and later expressed condolences on social media. 

The shooting happened at about 5 p.m., officials said.

A large police presence was seen Thursday evening near Osprey Cove Drive and Bay Harbor Drive in the Hedingham neighborhood along the Neuse River Greenway in response to the shooting.

Raleigh police, with the help of the Wake County Sheriff's Office and other law enforcement agencies, expanded the search at about 6:50 p.m., issuing an advisory for residents near McConnell Oliver Drive, Tarheel Club Drive and Old Milburnie Road to remain indoors and urging drivers to avoid the areas.

Many roads and entrances to the Neuse River Greenway were blocked as police conducted their investigation.

The neighborhood where police were focusing is a suburban area that backs up to the Neuse River. 

In a letter obtained by Spectrum News 1, the Hedingham neighborhood board of directors offered condolences and support for those in the community and said in part, "Please hold your loved ones close tonight, call someone and tell them you love them. If you are religious, send prayers to those who need it."