Two rookie police officers from Barrie, Ont., underwent emergency surgery, after being attacked by a knife-wielding male suspect who was shot dead during an altercation on Sunday morning.

It was the second fatal police shooting in Ontario in the same weekend.

The Barrie officers had only been on the job for a short time, starting on their own patrols in April.

Both officers were rushed to Barrie's Royal Victoria Hospital for surgery after suffering critical injuries in Sunday's altercation. Both were in stable condition following surgery.

"We believe and we hope and pray that they live. We expect they will," Chief Wayne Frechette told reporters Sunday.

Barrie police Const. John Parliament told ctvtoronto.ca that the incident happened Sunday morning at about 10:30 a.m., outside a busy mall near Bayfield and Heather Streets.

Ontario's Special Investigations Unit is now involved with the case.

According to the SIU, two Barrie police officers "were on an investigation" when they began interacting with the male suspect at the scene.

"As a result of this interaction both officers suffered critical injuries and the male was shot," the SIU said in a news release on Sunday afternoon.

Witnesses said the officers had stopped a man while he was walking along a street. By the end of the confrontation, they say both officers had been stabbed and their alleged assailant shot.

Witness Cheryl Jamieson said it got to the point where one officer stood in front of the male suspect, who was holding up a knife.

"He (the officer) had to shoot him about six times because he (the suspect) wouldn't drop. And he finally dropped," Jamieson said.

The SIU said the male suspect was pronounced dead at the same hospital where the two officers were treated.

The suspect has not yet been publicly identified by police and the SIU has not elaborated on how the altercation occurred.

Barrie is located about 100 kilometres north of Toronto.

Anyone with information about the incident is asked to call SIU investigators at 416-622-1935, or at 1-800-787-8529, ext. 1935.

The SIU investigates cases of serious injuries or deaths involving police.

Sunday's incident followed a fatal police shooting Friday night in the Eastern Ontario city of Brockville, where a driver was shot and killed after a confrontation with OPP officers. That incident is also being investigated by the SIU.

With a report from CTV Toronto's Zuraidah Alman and files from The Canadian Press