FREDERICTON -- New Brunswick's usually quiet capital city erupted in violence Friday, as two police officers responding to a shooting arrived to find two victims -- and were then fatally shot themselves.

The victims include Const. Robb Costello and Const. Sara Burns and two civilians -- a man and a woman -- who remain unidentified, police said.

"This is the worst moment for any chief of police in any police agency to have to deliver this news," police Chief Leanne Fitch told a news conference.

A Fredericton hospital was treating "multiple victims," but police would not say how many people were injured in the incident, in a residential area on the city's north side.

Police said they have a 48-year-old Fredericton man in custody who was being treated for serious injuries. They would not reveal what kind of firearm was used.

Deputy police chief Martin Gaudet said the two officers responded to the area at about 7:10 a.m. and found two victims on the ground, an adult man and woman.

"That's when they (the officers) were shot," he said during a news conference.

He had no information on any others who were hurt.

"There were many officers in and around the building at that time, so when the call came in shots fired, officers jumped in a cruiser and attended the scene. They were the initial officers on scene."

Costello, 45, was a 20-year police veteran with four children, while Burns, 43, had been an officer for two years and was married with three children.

Jackie McLean, Costello's common-law partner, says a police inspector told family members the news Friday morning.

"He loved being a police officer and he lived for being a police officer," she told The Canadian Press in an interview.

Residents said the incident began at about 7 a.m. at an apartment complex on Brookside Drive.

Tim Morehouse said he was in his apartment when he heard someone shout: "Shut up! Shut up!"

He said he heard two gunshots, and then three more. He said he looked out his window and saw the body of a man on the ground, in the back parking lot of 237 Brookside Dr.

"I hear more shots and looked out and there's two police officers on the ground. I called 911 and they came and checked on them and they were shot," he said.

David MacCoubrey said he awoke in his Brookside Drive apartment at 7:07 a.m. to the sound of gunshots "10 metres from my bed."

MacCoubrey said three gunshots woke him up, and as many as 17 more were fired between that time and around 8:30 a.m.

"It sounded like the first one came from right outside my bedroom window. ... I was hoping for the two seconds that I was groggy that it was kids blowing off firecrackers," said MacCoubrey in a phone interview from inside his apartment, where he was sitting on the floor away from windows.

"Then two more happened within the first three minutes."

He said the apartment complex has four buildings in a square, and it sounded like the shots were coming from the middle of the complex.

MacCoubrey said police had searched the buildings and went through his apartment.

"I saw an armoured vehicle out in the courtyard and I opened up my window to see if I could hear anything and the shots started again," he said. "I'm not scared in the least. I'm angry. I don't like the violence. ... I'm worried for the other people around me."

About 50 people from the apartment complex were displaced after the shooting, and police said the city and Red Cross were arranging alternate lodging for the residents.

Meanwhile, a large group of Fredericton police officers gathered outside the Chalmers hospital, and appeared to be consoling each other. They watched as the hospital's New Brunswick and Canadian flags were lowered to half-mast.

By Friday afternoon, a memorial of flowers and messages was growing in front of the Fredericton police station. Among the messages: "We love you our brothers and sisters in blue! Thank you for ALL that you do!"

Another read: "Fredericton Police Force, your city has your back!"

A vigil was held Friday evening where more than 100 mourners packed into St. John the Evangelist Anglican Church.

One by one, they stepped forward to light a display of candles under a board displaying a passage from the Bible: "Blessed are those who mourn, for they will be comforted."

As piano music filled the room, the mourners held flickering candles and wiped their eyes as they sang "Amazing Grace."

Anglican Bishop David Edwards told the crowd the candles represented "the light and that solidarity with each other and with those who have been greatly afflicted and affected."

As of 9 p.m., RCMP could still be seen walking in and out of a three-story brick apartment building, which was cordoned off by police tape.

Outside the scene, New Brunswick Premier Brian Gallant urged the public to be patient in waiting for answers.

"The Fredericton police force, the RCMP and authorities are doing everything they can to ensure they undertake the investigation as rapidly as possible, and they're doing everything they can to notify the family of the victims," he said in an interview.

"These things need to happen in the proper sequence. I know there's not as much information as people would like, but it's for a reason, of course."

The shooting also prompted an outpouring of sympathy from across Canada.

Many police forces lowered their flags to half-mast, and political leaders of every stripe offered their condolences.

"Thank you to all those Canadians for their condolences and their thoughts," said New Brunswick Premier Brian Gallant.

"There's no doubt that it helps .. to know the whole Canadian family will be there to support them."

Gaudet said the investigation has been turned over to the RCMP.

Fitch said she had reached out to Nova Scotia's Serious Incident Response Team, which investigates police-involved shootings.

The Fredericton shootings come just four years after another traumatic event for police and the public in another New Brunswick city.

In June 2014, RCMP Constables Doug Larche, Fabrice Gevaudan and Dave Ross were killed in a shooting rampage by Justin Bourque. Constables Eric Dubois and Darlene Goguen were also injured when Bourque went hunting police officers in a Moncton neighbourhood.

There were between six and 11 homicides a year in New Brunswick between 2012 and 2016, according to Statistics Canada.

-- With Michelle McQuigge and Gabriele Roy in Toronto, Aly Thomson and Keith Doucette in Halifax, and Holly McKenzie-Sutter in St. John's.

-- With Michelle McQuigge and Gabriele Roy in Toronto, Aly Thomson and Keith Doucette in Halifax, and Holly McKenzie-Sutter in St. John's.