(CNN) -- A gunman accused of fatally shooting three police officers and wounding two others is still on the loose nearly a day after the rampage began, Canadian police said Thursday.
Specials police forces are searching for the suspect in the city of Moncton, New Brunswick, Royal Canadian Mounted Police Cpl. Chantal Farrah told reporters.
She warned residents to stay inside, lock their doors and not to share any photos of police operations.
"All the operations that you see unfolding in your neighborhood, do not take photos of that, do not put photos on social media, and that's going to help us resolve this," she said.
Police posted to social media a photograph of a man dressed in fatigues, carrying what appeared to be a rifle.
In Moncton, a city once named Canada's most polite, the violence left residents rattled and seasoned police shaken.
A man dressed in fatigues and carrying a rifle went on a rampage, killing three police officers and wounding two others.
Police say they know who the suspect is: 24-year-old Justin Bourque of Moncton.
On Thursday morning, police spotted Bourque at least three times in the area, but did not catch him, New Brunswick Royal Canadian Mounted Police Superintendent Marlene Snowman said.
The search for the suspect continues, and Snowman asked residents to stay indoors and remain calm.
The victims were all officers of the RCMP, said Roger Brown, the commander for the New Brunswick RCMP.
"This is perhaps the darkest day in the history of RCMP New Brunswick," he said.
Authorities have not released the names of the officers killed, saying they are waiting for all family members to be notified.
Police don't know -- or haven't disclosed -- what prompted the attacks.
Police leaders appeared emotional as they conveyed the few details they had to reporters.
"As you can imagine, this is working through your worst nightmare," Brown said.
The rampage began Wednesday evening when police responded to a report of an armed man in the north end of Moncton.
The gunman opened fire.
Three RCMP officers were shot and killed, Constable Damien Theriault told reporters.
"Two of our officers were also injured, but their lives are not threatened at this time," he said, his voice breaking at times.
One of the wounded police officers remains hospitalized, and another officer has been released from the hospital, Farrah said Thursday.
Joan MacAlpine-Stiles recalled seeing the gunman when she opened a window.
"It was really warm in the house, so we opened up the windows in the family room, and there he was going across through the back with this rifle on his shoulder," she told CNN partner CBC.
"I said, 'Oh, my God, there he is with camouflage and the headband and a gun,' and it looked like a bow he had with him, and I mean, he was just through our backyard," she said.
After police arrived, neighbor Vanessa Bernatchez watched with a couple of others from a living room window. She uploaded a video of the confrontation to Facebook.
"He shot him. He shot the ... cop," a man in the video exclaims. "Call 911!"
'That could never happen here'
Moncton, a city of about 140,000 people, is about 150 kilometers (93 miles) northeast of Saint John.
The Canadian magazine Chatelaine has described Moncton as one of the best places to live and work in Canada, according to the city's website.
In addition, Reader's Digest recently named Moncton as the most polite city in all of Canada, the city said.
Such accolades seem to matter little now.
The violence shook Moncton and beyond.
"It's a lot. Especially for a city like this, where you wouldn't expect something to happen like this," resident Jonathan Hurshman told CTV. "You see it all in the States, and you think, 'No, that could never happen here' -- and sure enough, it happens here."
There were no homicides in Moncton in 2011 and 2012, and the average number of homicides per year between 2006 and 2011 was one.
In 2012, the homicide rate in Canada was 1.6 per 100,000, while in the United States, it was 4.7 per 100,000, according to United Nations statistics.
Hurshman told CTV that he tried to get close to the confrontation with his video camera, only to be brusquely turned away by police.
He didn't see the suspect, but he heard the gunshots and saw what he thought was a police officer on the ground.
"There was a lot going through my head. It was a lot to take in, seeing something like this happen here," he said.
Hurshman's family would remain inside their house all day, he told CTV, but early Thursday, he witnessed neighbors who didn't feel safe packing their cars and leaving.
As the hunt dragged into Thursday morning, police continued giving updates and warnings.
"Shooter still believed to be in Pinehurst Subdiv. area of Moncton. Stay locked inside. Avoid area," the RCMP's New Brunswick office tweeted.
All entrances to the neighborhood where the attack took place were blocked off, city spokeswoman Isabelle LeBlanc said Wednesday night. Her husband had not been able to get home.
Even some buses were pulled off the road out of concern for public safety, she said.
As police keep looking for the gunman, they must do so while grieving the deaths of their colleagues.
When asked how officers would push through, Constable Theriault said, "We are professional."
Moments later, he choked up and ended the news conference.