Police in Fredericton, a city of about 56,000 that is the capital of the province of New Brunswick, have a 48-year-old suspect in custody.
Fredericton's deputy police chief Martin Gaudet said the two the officers saw two deceased civilians before being shot and killed themselves. Police chief Leanne Fitch identified the two officers as Sara Burns, 43 and Robb Costello, 45. Ms Burns was married and had three children, and Mr Costello had a partner and four children.
The two other victims are yet to be identified.
"Awful news coming out of Fredericton," Canadian Prime Minister Justin Trudeau said on Twitter. "My heart goes out to everyone affected by this morning's shooting. We're following the situation closely."
Three Royal Canadian Mounted Police officers were killed and two more were wounded in 2014 in Moncton, New Brunswick, about 195 km (121 miles) from Fredericton, in one of the worst incidents of its kind in Canada.
At least four people were killed in a shooting incident in the eastern Canadian city of Fredericton, police said on Friday.
The Fredericton police said in a post on Twitter the incident was ongoing and there were multiple fatalities. The police urged people to stay inside and lock doors.
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 United States 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.
Police have told residents not to call the police station directly and instead call 911.
"Due to the volume of calls, please refrain from calling the police station directly, and in case of emergency continue to call 9-1-1," they wrote on Twitter.
The area the shooting took place is a quiet-looking residential street, with houses running along the road. The incident is thought to be contained to those houses for now.
Fredericton firefighters have asked local residents not to report the locations of police in the area.
"Police, Fire and ANB responding to an active incident," they wrote on Facebook. "Please avoid the area of Brookside Dr between Ring and Main. Stay in your house and businesses. Lock the doors and do not use social media to report on police locations. Please help keep everyone safe."
Police have echoed that warning – stressing that the location of first responders must not be published online.
"IMPORTANT: Please do not post information about the position or activities of police or first responders," the force wrote onTwitter. "We are still working an active incident. We will release confirmed information as soon as we can."
"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. Please continue to avoid the area and follow us for the facts."
Further details of the incident are arriving from residents, via Press Association:
David MacCoubrey, who lives in Fredericton, said he woke up in his apartment on Brookside Drive at around 7am local time to the sound of three gunshots 10 metres from his bed.
Mr MacCoubrey said more than 15 other gunshots were subsequently fired between that time and around 8.30am.
He says his apartment complex has four buildings in a square, and it sounded like the shots were coming from the middle of the complex.
Mr MacCoubrey said police have been searching the complex and he has been sitting on the floor of his home away from windows.
As police are investigating the shooting, they report the area of Brookside is contained and have cautioned people to "please continue to avoid the area," Fredericton police said.
The city has approximately 60,000 people in the province of New Brunswick.
Canadian Prime Minster Justin Trudeau responded to the incident via Twitter. It is the second mass shooting to take place in Canada in just the last few weeks.
The last one resulted in two deaths and 13 people injured in the Greektown section of Toronto, prompting the city council to vote overwhelmingly in favour of asking Mr Trudeau's government to ban all sales of handguns and handgun ammunition in the city.
Back in 2014, three Royal Canadian Mounted Police (RCMP) officers were shot dead and two others seriously injured by 24-year-old shooter Justin Bourque in Moncton, also located in the maritime province of New Brunswick.
It was the first homicide in Moncton in four years, but not the deadliest incident for the RCMP.
In 2005, James Roszko of Mayerthorpe in the Alberta province, shot and killed four RCMP constables as they were carrying out a property seizure on his farm. It stands as the deadliest incident for the RCMP in Canadian history.
Police have not yet released the names of the slain police officers who were killed during a shooting earlier this morning in an apartment complex in the Brookside area of Fredricton, New Brunswick in eastern Canada.
Bill Henwood, a funeral director at York Funeral Home, whose business is located inside the cordoned off area on Brookside Drive in Fredericton, said the lockdown occurred before anybody got to work.
Mr Henwood told the Associated Press people are sitting in their cars or just standing near the blockade of police and fire vehicles "hanging tight and waiting for word" on what comes next.
"All the businesses even on the outside of the lockdown area have their lobbies and their business areas closed. They aren't letting customers in at the moment," he said.
Mr Henwood said the situation is a shock.
"It's not something that we expect in Fredericton to wake up and hear about. To see that there's actually fatalities is pretty extraordinary for this area. It doesn't normally happen."