Heavily armed RCMP officers patrolled the small east coast city overnight in the search for 24-year-old Justin Bourque, a Moncton man who was wearing military camouflage and carrying two rifles in a picture released by police on Twitter.
Police said he was armed and dangerous and urged anyone with information on his whereabouts to come forward.
RCMP Const. Damien Theriault said police responded to a call Wednesday evening about an armed man in the north end of Moncton. Three of the responding officers were killed and two sustained non-life threatening injuries and were in stable condition.
Police released a map of a large portion of the northwest section of the city of 69,000 people, including a heavily wooded area, where they wanted people to remain inside with their doors locked.
An unmarked police vehicle sits on Mailhot Avenue with the window shot out in Moncton, New Brunswic (AP Photo)
They warned people to expect roadblocks and traffic disruptions.
Schools and government offices were closed, and the city pulled its buses off the roads. Mail delivery was also suspended.
The two injured officers were being treated for wounds that the RCMP described as non life-threatening.
Theriault broke down in tears at a media briefing as he spoke of the deaths of his three colleagues late Wednesday night.
"We are still actively looking for the shooter," Theriault said. "He is believed to still be in the Pinehurst subdivision area of Moncton. We are urging people in that area to stay inside and lock their doors and for people to stay away from that area."
Asked how he was dealing with his grief, Theriault said he personally knew the officers. He broke down, unable to complete his sentence, and excused himself.
Daniel St. Louis, a commercial photographer in Moncton, was among the first on the scene Tuesday around 8:30 p.m. when he came across two police vehicles on different streets with blood visible inside.
One of the vehicles, a marked police cruiser, was surrounded by shattered glass. The other, an unmarked SUV with its lights still on and the driver's side door left open, had several bullet holes through its front windshield.
St. Louis said he saw something shortly after that will always haunt him.
"I walked over and I saw two feet, facing the street, toes up," said St. Louis, 51. "I realized, 'Oh my God. There's somebody down.' As I got close, I realized it was an officer and this is not a good situation."
St. Louis said he doesn't know what to make of the tragedy.
"Our quiet little city, what is going on here?" he said. "How is this happening to us? It always happens to somebody else."
Danny Leblanc, 42, said he saw the shooter in the distance Wednesday evening, wearing a camouflage outfit and standing in the middle of the street with his gun pointed at police cars.
The construction worker said he believed it was an RCMP officer until he heard a burst of automatic gunfire coming from the man's gun.
He said he quickly retreated into his home and remained there with his family. At one point a neighbor posted on social media that their kitchen window was shattered by gunfire.
Leblanc said few people on his normally quiet street were sleeping as they awaited word at midnight on whether an arrest had been made.
Word that police had been killed shocked the city, Leblanc said.
"It's devastating. I don't know if he was on a hunt for them, or what," he said.
Police had a number of roads in the city blocked and traffic was backed up on major arteries across the city. Drivers were also asked to stay out of the area.
Moncton Mayor George LeBlanc urged all residents to pay strict attention to the RCMP warnings.
"It is a terrible tragedy," he said. "We as a city must pull together as a family to support those who have suffered losses."
Such violence is rare in Canada, particularly on Canada's East Coast. Theriault said the city of Moncton didn't have a homicide last year or this year until Wednesday evening.
"We have been blessed until this point," he told The Associated Press.
He said other RCMP officers from around Atlantic Canada are in Moncton assisting with the search.
The shootings brought back memories of when four Royal Canadian Mounted Police officers were killed in the western Canadian province of Alberta in 2005 in the deadliest attack on Canadian police officers in 120 years. They had been investigating a farm in Mayerthrope, a hamlet in Alberta, when a man shot them. The gunman was killed.
The Horizon Health Network, a provincial health authority, said two patients were taken to Moncton Hospital with gunshot wounds. Horizon Health said the two shooting victims were in stable condition.
Canadian Prime Minister Stephen Harper offered his condolences to the families, colleagues and friends of those affected by the shootings.