BRAMPTON, Ont. - A police officer who was shot at a Toronto-area courthouse remained in hospital in stable condition, alert and speaking with his family, police said Saturday.

Const. Mike Klarenbeek, 53, was providing security at the Brampton courthouse Friday morning when a man walked in and opened fire.

The officer, who served with the Peel Region police force west of Toronto, was wounded and his assailant was killed by police gunfire.

A spokeswoman with the province's police watchdog, which is investigating the incident, says in an email the man was 46-years-old and that his family has not consented to the release of his name.

The Special Investigation's Unit's Jasbir Brar added that investigators are reviewing how two officers handled the incident.

The motive of the 46-year-old, who police believe is from Brampton, is not known.

Klarenbeek, a 30-year police veteran described as a family man, was taken to a Toronto trauma centre.

In a statement released by police, his wife Lynn said the family is thankful to everyone who has offered support "through this difficult time," including paramedics, police and members of the public.

"Mike specifically wanted to thank a nurse, who was at the courthouse that day. She was the first to tend to him, before the paramedics arrived. He says without her help, it may have had a different outcome."

Peel police thanked people who sent along well wishes for the officer through social media.

"There are so many tweets being sent for Cst. Klarenbeek that I am unable to respond to all, but please be assured everyone is appreciated," Peel police said on their Twitter feed.

"Your prayers worked and he is doing well! Thank you all."

The Special Investigations Unit is automatically brought in cases where police are involved in a situation that results in death or serious injury.