Four people, including two police officers, were killed in a shooting in eastern Canada and one person was taken into custody, police said.

The incident happened in Fredericton, a city of about 56,000 that is the capital of the province of New Brunswick.

Police confirmed that two officers were among the dead.

They have been named as 43-year-old Sarah May Burns and Lawrence Robb Costello, who was 45.

The two other victims have not yet been identified.

A 48-year-old suspect is in custody. He is being treated for serious injuries.

Local media images showed emergency vehicles converging on a tree-lined residential street. Nearby facilities were closed and authorities told residents to stay locked in their homes.

Canadian Public Safety Minister Ralph Goodale said the Royal Canadian Mounted Police (RCMP) were assisting Fredericton authorities.

Canadian Prime Minister Justin Trudeau said in a post on Twitter that his heart went out to everyone affected.

New Brunswick had only three homicide shootings in 2016, according to Statistics Canada.

Gun laws in Canada are more strict than in the United States but a proliferation of weapons has led to an increase in gun crimes in recent years.

Three RCMP officers were killed and two more were wounded in 2014 in Moncton, New Brunswick, about 195km from Fredericton, in one of the worst incidents of its kind in Canada.

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

Toronto, Canada's largest city, has had 241 shooting incidents this year, resulting in 30 deaths, a 30% increase in fatalities.

Yesterday, 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.