(CNN) -- A gunman who killed three police officers and wounded two others in Canada is in custody after more than a day on the run, authorities said Friday.
Police arrested Justin Bourque, 24, at 12:10 a.m. Friday (11:10 p.m. ET Thursday), according to the Royal Canadian Mounted Police.
Authorities said the suspect, dressed in fatigues and armed with a rifle, went on a rampage Wednesday evening in Moncton, New Brunswick.
Grieving police officers launched a manhunt for him. During news conferences, they broke down over the loss of their colleagues.
Canadian police say they have arrested a man suspected to have shot dead three police officers and wounded two more. Sarah Toms reports.
Michelle Thibodeau said the suspect was arrested on the front lawn of her home in Moncton.
She told CNN partner CBC that she watched authorities take down a man resembling a suspect seen in pictures circulated widely.
"The SWAT team arrived at my house and unloaded, and started screaming in my backyard for him to surrender and he did,"she tweeted.
"They had him sprawled on my front lawn for some time and then loaded him into the SWAT vehicle. They are now checking my yard for firearms."
Shortly after the shooting, SWAT teams swarmed neighborhoods and surrounded buildings, warning everyone to stay inside, lock their doors and remain calm.
"We can all rest easy and safe here in Moncton, thanks to the wonderful RCMP and all of the officers. We sincerely thank you!," Tawni McCready posted on the local police Facebook page. "Our greatest sympathies go out to the families of our fallen heroes."
Police spotted the suspect at least three times Thursday morning, but did not catch him, Royal Canadian Mounted Police Superintendent Marlene Snowman said.
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.
Last social media post?
A Facebook page purported to belong to Bourque has many posts with pro-gun photos and a few anti-police memes.
There is also one photo in which two men pose with shotguns in the snow. It was posted February 25, six days after the Facebook page was created, and is used as the profile picture.
In what appears to be his final post, the page's author used the words of a song by the metal group Megadeath.
You say you've got the answers, well who asked you anyway?
Ever think maybe it was meant to be this way?
Don't try to fool us, we know the worst is yet to come.
I believe my kingdom will come.
Terror outside the window
The rampage began Wednesday evening when police responded to a report of an armed man in the north end of Moncton.
Joan MacAlpine-Stiles saw the gunman through an open 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!"
Moncton, a city of about 140,000 people, is about 150 kilometers (93 miles) northeast of Saint John.
"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.
CNN's Mariano Castillo, Dave Alsup, AnneClaire Stapleton, Greg Botelho, Kevin Conlon and Elizabeth Lander contributed to this report.