The force asked members of the public not to post information about the position or activities of officers or first responders online.

And in a later statement, it sadly confirmed four people were killed in the shooting - two of whom were Fredericton Police officers.

It said it was a "difficult time" for the victims' families and colleagues.

The force tweeted: "Of the four people killed in this morning's shootings on Brookside Drive, two were Fredericton Police officers. No names are being released at this time.

"Please appreciate this is a difficult time for their families and our colleagues.

"We will provide more info when we can."

Police had earlier said there were "multiple fatalities".

It tweeted: "Re: Shooting. At this time, we can confirm multiple fatalities.

"The incident is ongoing. More information will be available when we can. Please continue to avoid the area of Brookside Drive between Main and Ring Road."

Emergency crews responded to Brookside Drive area this morning.

At the time, police said: "The public is asked to avoid the area and stay in their homes with doors locked at this time for their safety."

CTV News reporter Nick Moore said he and other journalists heard what sounded like four gunshots as police dealt with the incident.

Additional officers and an armoured police vehicle soon arrived at the scene.

But police later announced they had arrested a suspect.

They tweeted: "At this time we can confirm that we have one suspect in custody.

"Police continue to have the Brookside area contained for the foreseeable future as the investigation is ongoing."

As the neighbourhood was shut down, a worker at nearby Tim Hortons coffee and doughnut shop told CBC that staff had locked the doors so no-one could get inside.

One reporter described how people were being "escorted out of the area".

Cops received so many calls about the incident they asked people to stop calling the police station directly, and to dial 911 in the case of an emergency.

Fredericton is the capital of New Brunswick, a province in Atlantic Canada.

It is home to about 58,000 people.

In 2014, another mass shooting in New Brunswick led to the deaths of three Royal Canadian Mounted Police officers and the wounding of two more in Moncton.

At the time, the incident was one of the worst of its kind in Canada, where gun laws are stricter than they are in the US and deadly attacks on police are rare.

But a proliferation of weapons has led to an increase in gun crimes in recent years.

Last month, a gunman walked down a busy Toronto street, killing two people and wounding 13 before turning his gun on himself.

On Thursday, Ontario pledged more money for police and to keep suspects behind bars while they await trial on gun crimes charges, as the Canadian province grapples with rising shootings involving domestically obtained weapons.