Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A white Chicago police officer on trial for murder took the stand Tuesday and tearfully said the black teenager he shot 16 times was "advancing" toward him and would not drop a knife he was holding.

In a dramatic courtroom moment, Officer Jason Van Dyke testified that he opened fire on 17-year-old Laquan McDonald after the teen allegedly advanced toward officers and ignored repeated orders from officers to drop the knife in October 2014. The prosecution immediately countered, playing videos in court that appeared to contradict his testimony that McDonald was "advancing" and waiving his knife.

"He got right about 10 to 15 feet away from me," Van Dyke said in his testimony, his eyes filling with tears.

"We never lost eye contact, his eyes were bugging out, his face was just expressionless," he said. "He turned his torso towards me. He waved the knife from his lower right side upwards across his body towards my left shoulder."

"I shot him," he said. Van Dyke said he did not know how many times fired and was not certain he had hit McDonald until he saw him fall to the ground. He said he initially stopped shooting after that, but McDonald still had the knife in his hand so he fired a few rounds at the knife.

Officer Jason Van Dyke, charged in the shooting death of Laquan McDonald, testifies in his murder trial on Tuesday in Chicago. Antonio Perez / Chicago Tribune pool via AP

He referred to McDonald several times as a “male black in a black hoodie and blue jeans.”

Assistant Special Prosecutor Jody Gleason played videos presented in court, arguing the details did not match up to Van Dyke's testimony of McDonald's actions. Footage of the fatal shooting that first released to the public more than a year after the incident sparked protests and citywide unrest.

Laquan McDonald. NBC Chicago

She repeatedly played police dashcam video and the defense's 3D recreation of the incident, questioning whether they showed McDonald waving the knife the way the officer described.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

While he admitted the videos did not show him raising the knife in that way, he said the videos did show his "perspective."

Gleason questioned Van Dyke's claim that he saw McDonald attempting to get up after the first volley of shots.

"Is there any part in that video where Laquan McDonald was trying to get up?" she asked.

"That video may not show it, but that wasn’t from my perspective," he said.

Gleason questioned Van Dyke on why he continued to shoot after McDonald had fallen to the ground.

“My focus was just on that knife, and I just wanted him to get rid of that knife,” he said.

She asked if he was trained to shoot at a knife and he said he was not.

Prior to Van Dyke's testimony, the defense called its final witnesses to the stand, a psychologist who interviewed Van Dyke and a Chicago police officer who retrieved items after McDonald died.

The psychologist, Dr. Laurence Miller, was called as an expert witness and testified that, based on the information he had seen and from talking to Van Dyke, the officer “responded to what he perceived was a deadly threat.” He added Van Dyke acted in a way that was “designed to neutralize that threat as he understood it.”

When asked if a reasonable officer would have acted that way, he responded, a “reasonable officer faced with the perceptual reality of what Officer Van Dyke was experiencing, the answer would be yes.”

Upon cross-examination, prosecutors tried to show contradictions between what the officer told Miller, police at the scene and what was shown on the dashcam video.

McDonald was killed after police were called to a report of someone breaking into vehicles.

Testimony in the trial and radio calls showed officers were waiting for an officer with a Taser. Minutes after the call, Van Dyke shot McDonald.

Last week, the defense called more than a dozen witnesses and sought to portray McDonald as a knife-wielding suspect “on a rampage” who posed a threat on the night he was shot by Van Dyke.

Prosecutors have argued Van Dyke was unjustified in using deadly force against McDonald and have said the video of the shooting appeared to show McDonald walking away when Van Dyke opened fire.

A Justice Department probe sparked by the shooting found deep-rooted systemic civil rights violations by Chicago's police department. This July, city and state officials released a plan with far-reaching police reforms under federal court supervision in response to the investigation.

One current and two former Chicago police officers were charged last June with state felony counts of conspiracy, obstruction of justice and official misconduct for allegedly helping to cover up for Van Dyke.

One of those officers, Officer Joseph Walsh, was given immunity for testifying off-camera during Van Dyke's trial. He testified he believed McDonald was a danger at the time of the shooting, contradicting the testimony of other officers who have disputed the details of Van Dyke's testimony.