CHICAGO (AP) — A video shown Tuesday to the jury hearing the case against one of the men accused in the 2013 shooting death of a 15-year-old Chicago honor student shows the suspect confessing he fired the fatal shot.

On the video, Micheail Ward can be heard telling police how he fired into a park, aiming for who he believed were rival gang members. The bullets struck Hadiya Pendleton, who Ward said "was not supposed to be there," and two others.

In the video, Ward was asked by a detective how many times did he fire the gun.

"Six," he answered.

Ward also gave details on how he and companion Kenneth Williams drove to the park on the day of the shooting and how Williams told him to target rival gang members.

"I didn't want to do it," Ward said in the video, adding Williams threatened to kill him if he didn't.

Defense attorneys tried to show how to the actions of the detectives manipulated Ward into confessing to the murder.

Defense attorney Gina Piemonte noted the detectives raised their voices, swore and occasionally got physically close to Ward.

"If someone tells you something you don't believe to be the truth, you don't stop there, right?" Piemonte said, adding investigators had a belief about what happened.

"I had the investigation that we had been conducting," Det. John Halloran said. "I had the information we had gathered over these two weeks. That's what I was armed with."

Early in the video, Ward can be seen denying shooting into the park and a detective continuously accusing him of lying. At one point, Det. John Murray reminded Ward that Michelle Obama attended Pendleton's funeral.

Prosecutors have rested their case against Williams, the alleged getaway driver. Separate juries were empaneled to hear the cases against Ward and Williams, who are both charged with first-degree murder.

Pendleton was shot days after performing as a majorette at President Barack Obama's inauguration festivities.