TORONTO -- For the first time since he shot down a teen on an empty streetcar two years ago, a Toronto police officer charged in the youth's death provided a public explanation for his actions, saying he never intended to kill anyone.

Testifying in his own defence Wednesday, Const. James Forcillo said he feared an attack from the knife-toting Sammy Yatim, which was why -- in accordance with all his police training -- he fired his gun.

"I never wanted to kill anybody," Forcillo told the court.

Forcillo has pleaded not guilty to second-degree murder and attempted murder in the death of 18-year-old Yatim, who was hit by eight out of nine bullets the officer fired one night in July 2013.

"The first sets of shots were fired because I believed Mr. Yatim was armed with a knife and was in the process of coming off the streetcar at me," Forcillo said.

"The second shots were fired because I believed Mr. Yatim was in the process of getting off the streetcar to continue his attack."

Crown prosecutors have said they plan to prove that Forcillo's actions during the incident weren't necessary or reasonable. Forcillo's lawyer has said his client's actions were justified and carried out in self-defence.

The jury has heard that Yatim had taken the drug ecstasy at some point before boarding the streetcar on which he eventually pulled out a small knife, causing panicked passengers to rush off.

Surveillance videos have shown Forcillo arriving at the scene, pointing his gun at the teen and yelling repeatedly at Yatim to "drop the knife." After a standoff that lasts about 50 seconds, Forcillo fires and Yatim is seen crumpling to the floor.

While on the witness stand, Forcillo explained that he had been trained to treat a person with a knife or any other "edged weapon" as a serious threat.

"The saying among police officers is that at close range a knife can be more dangerous than a gun," he said. "It's silent, it doesn't need to be reloaded and it can cause significant damage."

Forcillo explained that when facing a person with an edged weapon, he had been trained to draw his gun, try to create distance and watch the person's hands.

"At some point you're going to have to draw what they call a line of consent. If the person advances beyond that line you're going to have to make a decision on whether to fire your weapon," he said.

Forcillo's defence lawyer pressed him for details on that particular area of his training.

"How many times are you taught to shoot someone advancing with a knife you consider a serious threat?" his lawyer asked.

"The training is to fire your weapon as many times as you think is necessary to stop the threat," Forcillo said.

The jury at Forcillo's trial was made to watch two videos on Wednesday that the officer testified he'd seen many times as part of his police training.

One described the stabbing of two Ontario police officers in 2009 by a knife-wielding assailant who was thought to be impaired or mentally ill, while the other video described in detail the dangers of edged weapons and how police can react to them.

When asked what his takeaway had been from the videos, Forcillo said the clips taught him that "knives are deadly weapons that can cause serious damage."

"You must be aware of the deadly threat," he said. "Drawing your firearm is an appropriate use of force to a person armed with an edged weapon."

Court also heard that during one simulated training exercise involving a person coming towards him with a knife, Forcillo issued a command to drop the weapon and then fired at the person.

"The feedback was that my use of force was appropriate in my circumstances and that I passed the scenario," he said.

A U.S. use-of-force expert called by Crown prosecutors has testified that Forcillo had multiple alternatives to lethal force before he shot Yatim, but didn't use them.

Forcillo's lawyers, however, have cast doubt on the credibility of the expert, arguing the former American police chief who has helped several forces reform their operations had a "lack of practical experience."