A shooting in New Brunswick that claimed the lives of four people — two of them police officers — has left the small provincial capital of Fredericton reeling, while politicians from across the country step up to offer support and investigators piece together what happened.

Prime Minister Justin Trudeau phoned New Brunswick Premier Brian Gallant Friday promising federal assistance, including the services of RCMP investigators, to aid Fredericton Police as they grapple with the aftermath of an early-morning gun incident in a residential sector of the city's north side.

One suspect is in custody and being treated for serious injuries. Police identified the slain Fredericton officers as Lawrence Robb Costello and Sarah May Burns. The two civilian victims — a man and a woman, both adults — won't be named publicly until their families are notified.

Trudeau said he was moved by the heroism of the first responders who rushed to the scene after receiving reports of shots fired.

"They did not think twice about what they had to do to keep their fellow Canadians safe. They were unflinching in their duty. We will not forget the two fallen police officers whose sacrifice no doubt saved lives and prevented even greater tragedy," Trudeau said in a statement to reporters.

"There is no greater gesture than to put oneself in harm's way to protect the life of another.

Canadians across the country were shocked to wake up to news of the shooting in Fredericton. We mourn with everyone who has lost a loved one, and wish all those injured a speedy and full recovery. Full statement: <a href="https://t.co/9WEbag7GgS">https://t.co/9WEbag7GgS</a> —@JustinTrudeau

Trudeau said the federal government is "monitoring the situation closely" and stands ready "to assist in any way we can.

"The people of Fredericton are courageous, strong, and resilient. Canadians stand with you during this difficult time."

Public Safety Minister Ralph Goodale, the minister who oversees the RCMP, initially said Fredericton Police would take the lead on the investigation — a decision that was later reversed. The probe will now be handled by the New Brunswick RCMP's Major Crime Unit.

Public Safety Minister Ralph Goodale talks about the Fredericton shooting 0:30

"As the investigation unfolds, [Fredericton Police] will determine exactly what happened and how it happened and why it happened. Other jurisdictions can be engaged as other information is obtained," Goodale told reporters earlier Friday.

"At this stage, it is very early. What we do know is there are four Canadians dead and that is a huge tragedy for the whole country."

Goodale's department said Fredericton Police asked that the RCMP take the lead.

"Whenever any police force in the country needs the assistance and support of another police force ... whether it is federal, provincial, or municipal, they all rally together and cooperate seamlessly," Goodale said.

Toronto Mayor John Tory — whose city has been hit by its own shooting tragedies in recent months — said Toronto stands by Fredericton and encouraged its residents to stay strong.

"Unfortunately, we've had more than our own share of experience with these terrible kinds of tragedies and I understand completely how much they are very wounding to the community itself, leave alone the families of the victims, to whom I also express our condolences on behalf of all Torontonians," Tory said.

"I also know that our Canadian communities, including Toronto and Fredericton, are resilient. We're strong people and we're not going to let these kinds of things take us off our course in terms of the quality of life and how we live."

Federal Conservative Leader Andrew Scheer said he was shocked by the shooting that ripped through the Maritime city of 60,000 people.

Shocking and devastating news out of Fredericton this morning. Jill and I are praying for the families of these brave officers and everyone impacted by this morning’s violence. <a href="https://twitter.com/hashtag/FrederictonStrong?src=hash&ref_src=twsrc%5Etfw">#FrederictonStrong</a> <a href="https://t.co/LyJDUnsluD">https://t.co/LyJDUnsluD</a> —@AndrewScheer

NDP Leader Jagmeet Singh said he was shaken by the tragic news.

"My heart is with all those impacted by the shooting, along with all first responders at this time," he said.

Very tragic news coming out of Fredericton. My heart is with all those impacted by the shooting, along with all first responders at this time. —@theJagmeetSingh

Gov.-Gen. Julie Payette sent a tweet of her own telling Frederictonians that all Canadians stand with them.