An RCMP officer was killed by police in Quebec Wednesday morning after an alleged attack on a woman and teenager at his home in Saint-Jean-sur-Richelieu, in Quebec's Montérégie region.

The incident is being investigated by Quebec's bureau of investigations (BEI).

According to the BEI, Saint-Jean-sur-Richelieu police (SJSR) received a 911 call at 2:05 a.m. from a man saying he had just done something terrible.

When police arrived at the home on Biat Street, they found the man armed with a knife.

Officers opened fire and the 48-year-old was hit by at least one projectile.

He was taken to hospital where he was later pronounced dead.

Inside the home, police discovered a woman and a teenager, both with life-threatening injuries.

They were transported to hospital in serious condition.

"It was pretty dramatic. They're a good family," said Carmelo Perricone, a neighbour who woke up to the sound of gunshots. "They're good people. In theory, we never would have suspected something dramatic like this to happen."

He said he saw officers attempt to resuscitate his neighbour after the shooting. 

The man has since been identified as a Mountie with the RCMP's financial integrity unit, investigating white-collar crime. 

Six BEI investigators have been assigned to analyze the circumstances surrounding the incident, including the conduct of the officers involved in the shooting. 

Quebec provincial police have been put in charge of investigating the events leading up to the attack on the woman and boy.

The RCMP says it is collaborating with the BEI, but would not confirm any additional information about the officer.

Anyone who may have witnessed the incident is asked to contact the bureau via their website.

-- with files from Luca Caruso-Moro and The Canadian Press.