Pandemonium broke out at a Toronto-area courthouse Friday after a gunman shot and wounded an officer near the building's front entrance before being killed by police.

Const. Mike Klarenbeek, a 30-year police veteran who was providing security at the courthouse when he was shot, is in "stable condition," Peel region police said.

The confrontation began when a man entered the A. Grenville and William Davis Courthouse around 11 a.m. in Brampton, Ont., and fired a gun.

"Const. Mike Klarenbeek suffered a gunshot wound and the male party is deceased," said Staff Sgt. Dan Richardson, adding that the shooter was from Brampton.

 

Ontario's police watchdog -- which is now probing the case -- said the shooter was hit by other police officers and pronounced dead at the scene.

The injured officer, described as a family man, was being treated at a trauma centre in Toronto.

"We're a little upset right now," one police officer told The Canadian Press, describing his wounded colleague as a friend.

The courthouse was placed under a lockdown moments after the shooting, which left those inside the building in shock.

"I didn't believe that it was real, especially after the first shot. I thought it was a bottle that had popped," said Alex Anderson, who was in the hallway of the first floor where the shooting took place.

"Then a series of shots that just went two, three, four, five. In that process, people were running. Everyone was scattering to the nearest courtroom that they can just get into."

The 22-year-old said he later emerged back into the first-floor hallway and saw what appeared to be a covered body lying on the floor near the building's entrance.

"It looked like a body bag," he said.

Anderson also saw a woman, who was crying as she spoke on her cellphone, saying she had seen what happened.

"She said that it happened right in front of her, that a man had reached into his long trench coat and fired a shot," he said.

Anderson said the front entrance of the courthouse was blocked off as a crime scene while those who were in the building were being held in rooms on upper floors as potential witnesses to the incident.

"There's officers standing by the escalator, there's a whole bunch of officers by the front door, there's countless police cars outside, it's taped off everywhere," he said.

Mustafa Jaffer, who was on the fourth floor of the building when the shooting took place, said the atmosphere inside the courthouse was tense.

"Everyone was panicking here," the paralegal said. "Right now the cops have every angle of the courthouse locked. They're even outside the perimeter of the parking lot looking into every person's car."

Jaffer said while looking out of a window, he had seen someone being carried out of the courthouse to an ambulance.

"I saw either a body or the cop's body being transported from the stretcher into the ambulance," he said. "And then we saw the gun in an evidence bag. It's green. It was sealed and it was on the cop car."

Lawyer Michael Moon, who was on the building's second floor, said tactical police units with dogs had been searching every room after the shooting.

"They were suspicious of perhaps another party being in the courthouse," he said, adding that those in the locked down courthouse were getting frustrated at the lack of information being provided by police.

"There wasn't a lot of updates."

The SIU says it has assigned fifteen investigators and three forensic investigators to probe the circumstances of the incident.

Two helicopters kept watch from overhead.

With files from Diana Mehta in Toronto.